The decision was made a long time ago by a conservative government. The Merkel government shut down 6 nuclear plants after Fukushima. When the current government with what you call the came to power only three nuclear plants were still running and the decision to shut them down were made a lot earlier and the companies operating them did not want to continue. Those remaining nuclear plants produced only 6% of electricity in 2022 and prices did not go up after shutting them down.