For the world to transition to low-carbon electricity, energy from these sources needs to be cheaper than electricity from fossil fuels.
Fossil fuels dominate the global power supply because until very recently electricity from fossil fuels was far cheaper than electricity from renewables. This has dramatically changed within the last decade. In most places in the world power from new renewables is now cheaper than power from new fossil fuels.
The fundamental driver of this change is that renewable energy technologies follow learning curves, which means that with each doubling of the cumulative installed capacity their price declines by the same fraction. The price of electricity from fossil fuel sources however does not follow learning curves so that we should expect that the price difference between expensive fossil fuels and cheap renewables will become even larger in the future.
Source: Why did renewables become so cheap so fast? And what can we do to use this global opportunity for green growth? – Our World in Data