Germany has be notoriously slow at adopting renewable energy, and this is the result. All nations need a diverse source of energy from different providers. That way a country is not vulnerable if one source, such as imported gas from Russia, dries up.
Under Brown and Cameron, the UK incentivised wind and solar, and pushed for better energy efficiency. It was a good policy and is paying dividends now. Germany did nothing and are now suffering.
The fact that Germany is going back on its climate and pollution pledges is down to necessity. They are paying for their mistakes in the past.
And there are those in the UK who completely do not understand this. They want to reopen the coal power stations, build more. If Sunak has any sense, he should build more wind farms on the mainland (currently banned) and expand home solar (only 1 in 50 homes has it).