Maybe not closing nuclear would have been enough.
Around 2010 they had 17 reactors, then they shut down 8. Last years they only had 6 running, now only 3.
Yeah, they needed gas alright, because nuclear seems so much worse...
Now, NPPs are of course pretty expensive, and purely from a $/kWh perspective it's pretty difficult for the large-scale-engineering kind of power plant (this extends to any kind of thermal plant) to compete with the cheaper renewables. But $/kWh is not everything - NPPs are plannable and commandable capacity (unless you're the French), renewables aren't, so their kilowatt-hours are not actually directly comparable.
Naturally natural gas especially in Germany is not primarily used for electricity generation, but largely for process heat, residential heating and as a chemical. A lot of that could be replaced by using electricity, but that'd be quite expensive, too. However, even though natgas isn't used primarily for electricity, due to merit order / economic dispatch the gas price has a hugely outsized impact on electricity prices. This, among with very high taxes and dues on electricity, is what causes world-record prices in Germany.