Should have, but thats just not possible with the political support for coal and miners at the time. The greens wanted to phase out coal too, but with social democrats & conservatives there was never a chance.
And also nuclear was never as big as coal and gas in Germany, so it was realistically never an option. Even at the peak the generation was only half of what coal produced.
We did cut coal usage in half anyway since 1990, but by using renewables.
And before you say we could be coalfree then, nuclear and renewables don't work well together, because a built nuclear power plant has no economic motivation to shut down if there's a lot of renewables active. The best solution to get carbon emissions down (if a state doesn't have nukes) is and will be until fusion works, renewables and storage.