The moderate left (SPD in Germany, Labour in the UK, PSOE in Spain, Socialists in Francesco etc) underwent a transformation after the end of the cold war. It was called New Labour, the third way or even the purple way. Basically, moving towards the center in fiscal and economic matters with some social progressive window dressing. In Germany it was the social democrats who introduced the harshest welfare reforms. Schröder (the center-left chancellor that followed Kohl in the late nineties, was convinced that they were absolutely necessary and "better we do it and prevent the worst than let the right kill it off completely" (I'm summarizing here).
Back in the nineties a conciderable part of the industrialized world had center-left governments. But with the cold war being over and the famously greedbased eighties in their back and the all signs pointing to capitalism being the best system and ecomic liberalism being pushed very heavily and with what Germans call Reformstau (meaning a backlog of necessary reforms) on the table they were a bit too willing to "be reasonable" and compromise. They tried to salvage the welfare state and social cohesion by making lots of concessions. Many started to believe in trickle down style economics.
It is hard to say what would have happened without those developments. But they seriously alienated their former core voter base - blue collar workers and small employees. They tried to make up for that with a little social progressivism, but others could offer that more convincingly (in Germany the Greens are now the second largest party). Educated liberal voters moved to the Greens or the Libertarians or other alternatives. The former voter base partially moved to the far left or far right.
Meanwhile the center-right became socially progressive enough to absorb a huge part of the center. Those who disagree with that move to the center that e.g. Merkel stands for in Germany now vote for the far-right.
Austria is another country where the center-right and center-left cooperated for so long that people got tired of it and backed the far right.
Basically, these parties used to serve the function of fighting for a social safety net and a certain level of redistribution at times when Joe Average was working in a factory producing goods in his home town. Thanks to globalisation those days are long gone and there is no turning back the clock. Problems like the effects of global trade, demographic change, digitalisation, climate change, etc require international solutions and supranational cooperation. But that is a hard sell these days. The far left proclaims to be for it but keeps on with unhelpful populist talking points. The far right is totally against it of course and the moderate right does a little bit of it, just enough to keep business lobbyists happy and the populatione not angry enough to care. The moderate left is strangely visionless and silent in all this. A party of old folks with yesterday's solutions for the problems of tomorrow. Being all softspoken and willing to compromise, but with absolutely no bold vision. Naturally a lack of attractive candidates doesn't help either (in the case of Germany, France and the UK at least).