Think about it - all the most easily extracted fossil fuels, the stuff near the surface, are already exhausted. And, to transition to sustainable energy, you have to bootstrap manufacturing with fossil fuels, since mainstream sustainable energy requires photovoltaic cells and controllers and electronics.
This is related to the diminishing energy returns on energy invested (see ERoEI). It’s a measure of how much energy it takes (say 1 barrel of oil) to extract a certain amount of energy (also say 1 barrel of oil). When the first barrels of oil were extracted long ago the ERoEI was somewhere around 100, meaning you only needed to use one barrel of oil to extract 100 barrels. Last I heard, it was down to 10. If that reaches 1 then it’s basically game over for oil. There is still lots of oil far underground/undersea but it costs too much to extract.