It wasn't, but also Germany's strategic options are limited. US, being its strategic ally, is also its economic rival, and will not hesitate using its advantage of having own energy source. Self-sufficiency solely on renewables is also not an option, at least short and middle term.
Germany had a reliable energy source with many sources of fuel.
And then turned it off for no good reason at all. (Lots of bad reasons).
Leaving nuclear energy aside, European countries have massive reserves of shale gas. They decided not to exploit them and to be dependent on foreign powers instead. We read about Russia but now Germany imports from the US (shale gas!) and Qatar. The US have won the jackpot with the war in Ukraine: split Russia and Germany, and reaps the dollars as well.
They could start fracking... now their industry is going down, energy is going up and they cant even see US.