They started shutting down nuclear, to make switch to wind/solar, before Russia invaded. (or at least being very trusting of Russian supply, so that is error in hindsight).
You could make argument that the switch to wind/solar should have been more gradual, or with more ability to roll back. But don't think it is a good argument to not switch to wind/solar. Just about how to do it.
The same wind turbine in the scotland produces 3 to five times more power than in Germany
The same solar panel produces 3 times more power in Spanish winter than in German winter.
This is basic information available to anyone
https://globalsolaratlas.info/
But fine, you decided to do energy transition inefficiently.
At least don’t switch of nuclear while you are still relying on fossil fuels!
But yes, have a better fall back position.
Simply take the price of a typical modern 1.5GW electric reactor from somebody like South Korea. Calculate how many you need in Germany, add up the cost. And that's not even taking into account the cost savings you could get from building a large number of the same plants.
You end up with a number significantly less then what Germany has spend over the last 25 years, will spend the next 20 and has spent on energy subsidies because of their high electricity prices.