Germany spent most of the last two decades shutting down nuclear power plants while blocking renewables because the politicians were sponsored by coal and gas companies.
It's also because they were addicted to Russian gas, and had to spend a fortune to wean themselves off it once the war was raging - though not before giving Russia a lot of gas money for the war - and converting its power plants to use LNG, which it ships in from the USA. That is a mad situation even before Iran.