Why? Because PV and wind are now the cheapest forms of energy, because even when you add the cost of batteries those are still cheaper than coal and oil, and because the factories to make them are being made as quickly as possible because the eco-friendly solution is so much cheaper than fossil fuels.
The current trend line for PV is an exponential that started in 1992, going up by a factor of ~9000 in 29 years. Keep it up just until the end of this decade and all power — electric, heating, transport; domestic, industrial — is PV by around 2030, and the only reason to expect reality to fall short is that transitioning the final few bits is going to be harder than the first few bits.
I’m still worried about biodiversity losses, phosphorus, antibiotic resistance, etc., but not about CO2.