There's portability+density issue with renewable or even free electric. You cant run planes, trains, ships, heavy industry, heavy haulers, etc om battery. And thats where the lions share of fossil is burnt.
Transport is 26% of world energy usage, oil is 31% of world energy source.
https://www.eia.gov/todayinenergy/detail.php?id=23832 says that 12% of energy use for transport is air, 12% ships. So probably 75% of transport energy usage could be replaced by electricity. So about 75% of oil usage could be replaced easily.