Electricity generation isn't the only way we use fossil fuels and cause pollution. Fertilizer production needs hydrogen, where does that hydrogen come from? Natural gas. Why? Because not using natural gas increases the energy costs of fertilizer production near 10x over. Since it is currently 1% of total world electricity consumption already, that is a near 10% global increase in electricity demand for one (admitedly large) product. The replacement of plastics with other materials like paper, glass, and metal? All require higher energy input to produce than plastic. Not to mention that plastic will eventually breakdown and release carbon also. As the most economical mines start to dry up and we seek lesser ores to mine, mining and processing electrical requirements will continue to rise. Nearly every chemical reagent all around you causes pollution during products, but it can be 90% solved, mostly by the addition of more electrical electricity for heating, cooling, high and low pressure chambers, ect. to not create so many waste products that we trash into both the atmosphere and the ground and water. We don't use those cleaner methods now mostly because using the electricity to do so costs a LOT more. Nearly every industry on earth can be cleaner, but it costs significantly more electricity which needs to be fairly cheap. Something like concrete production could be done more far more cleanly, but again, massive amounts of additional electricity needed. And that is before we get into things like active carbon sequestering.
Or goals shouldn't be a direct replacement of fossil fuel electricity sources, our goals should be exceeding currently world electrical output multiple times over without fossil fuels, which means we should be producing nuclear, solar, wind, hydro, and geothermal power across the board in an attempt to meet our extreme future demands.
Maybe solar and wind and batteries will be up to the task in the future with some new technology, but also maybe not. Nuclear is a known feasible solution to providing as much power as we could ever want or need with technology we have right now. Solar and battery tech is often assuming we will continue on the same path of increased efficiency and reduced costs seemingly indefinitely, but you know what, they thought the same thing with nuclear energy until they started hitting some walls in generation efficiency and costs. And if it ends up not being significantly cheaper or easier, you gotta start bringing up questions of land usage and grid complexity on top of everything else.