Europe’s economy failed to expand at the end of 2023, dragging out the stagnation for more than a year amid higher energy prices, costlier credit and a downturn in former powerhouse Germany.