Run out of oil? How? We know how to turn coal into crude.
Coal liquefaction - Wikipedia
en.wikipedia.org
If our goal is to cook ourselves, we have plenty of fuel for the oven.
The question is the cost. You could solve climate change tomorrow by declaring the socialist Bolivarian revolution and reducing everyone (except the elites of course) to Venezuelan type poverty. The left has a grain of truth when they say the problem is capitalism. Yup...it's the system that made the West vastly better off than what it was like in preindustrial London or Paris...it's a problem that everyone is not poor anymore and wants to consume and that the third world wants it too. But you can't even get people to switch to GMO locally grown food without complaining let alone give up their Starbucks. Giving up planes, meat, hot showers, single family homes and shooting the dogs simply isn't going to happen. Once you get to a certain level of energy exhaustion, you effectively get there too.
There's also the other solution: you could wipe out Thanos style a good chunk of the population. But people don't seem to want to go there either.