Oil is just one aspect of climate change, coal was far more important because there’s plenty of coal to case extrem harm.
The vast majority of new electricity generation installed in the US over the last 15 years has been wind and solar. That naturally results in fossil fuels being fazed out when existing power plants age and thus need to be replaced. 70% of US electricity came from fossil fuels in 2010, that dropped to 60% by 2020. More significantly it mostly swapped to natural gas which emits far less CO2/KWh than coal.
We could go faster but the tail end of the curve represents a small fraction of the CO2 vs the peak. Even natural gas is facing severe pressure from ultra cheap battery backed solar. More importantly natural gas power plants don’t last nearly as long so will get fazed out much faster.
EV’s are also about more than tailpipe emissions, making and transporting gasoline is quite harmful before it ends up in a gas tank.