I think you could make that argument (at least structurally) as late as the 2000s when batteries and solar were still un-economical. Today it's very possible to power a modern economy without fossil fuels in almost every sector except long haul trucking, a few industrial processes, and aviation, and those together are a small percentage of overall fossil fuel use. Aviation and trucking are less than 10% of oil use.
Europe doesn't have an energy shortage that's not self-inflicted. Becoming dependent on Russian gas combined with anti-nuclear in Germany probably contribute. German greens are basically an advertising arm of Gazprom. (Just like how America's huge inflation is self-inflicted via dumb tariffs and unnecessary wars. We should pay politicians an extra bonus to do nothing.)
The most likely explanation for Europe's stagnation is a mix of stifling bureaucracy, low birth rates, brain drain (mostly to the US), and policies that are explicitly growth-limiting.