The fact that the shutdown of nuclear energy in Germany is based on irrational ideological fearmongering and that it's doubly stupid to do so BEFORE having finished building up sufficient renewable energy generation and storage capacity, thus leading, at least temporarily, to a de-facto replacement of a sizeable proportion of the part previously held by nuclear energy with fossil energies like coal that are far more dirty (with CO₂ and other pollutants)…
… doesn't in any way change the fact that Germany has indeed been massively investing in renewable energies and has built up enormous capacities in that domain that account for a much higher percentage of renewables in the energy mix than the overwhelming majority of developed countries… and that those early and continuous massive investments by Germany have played a major role in bringing these renewable energies to the much improved viability, maturity and price level they now have.
There is no contradiction between those two facts.