Up until 2011 or so Germany was a leader in solar and wind power equipment production. Then they cut off subsidies and it took AN ENTIRE DECADE to get back where they were, in terms of adding additional capacity, by which point China absolutely towered over everyone else.
Europe has also missed the battery production train.
Oil and gas are considered geostrategic priorities and almost every country tried to secure its supply. Solar and wind power equipment production as well as battery production, for some reason, were treated as second class citizens in a world where they will replace oil and gas for 80% of uses.