Coal will remain a popular choice for many more decades. It might be phased out of certain parts of the world but it is incredibly economically efficient and not dependent on the local area - remember than many countries are so large that a single grid is difficult to maintain.
New coal power stations pop up all the time (a couple a week in China alone) and while Covid has caused a massive halt in worldwide construction of new plants, the capacity to build renewable facilities on the same scale isn't here yet.
The chances are that once the world bounces back from 2020, coal will keep right on trucking, albeit not as heavily as it was beforehand.
-
Oil on the other hand is here to stay. It's just too useful. Lithium-Ion batteries have an energy density of at MOST 0.9 MJ/kg, while crude oil has an average of around 42 MJ/kg and refining it into petrol ups that to 46 MJ/kg. That's over 51x as much energy by weight. Now, that doesn't mean everything as the efficiency of extracting and using that energy comes into play, but right now it's still a hell of a lot more efficient to power a car with petrol than rechargeable batteries.
Also, consider that even if a battery can be recharged from renewable sources, the battery itself takes a pretty high toll on the environment, and even the money you save on petrol is balanced by the need to replace the battery as it loses capacity. Now, the cost of batteries is getting cheaper, but that is due to production outstripping demand. If every car on the road was electric, we'd suffer shortages of raw materials, much as we feared with oil.
-
I do think geothermal is the way forward for powering a grid though, especially if it's as interconnected as many economically developed countries.