Not infinite. But as we use up an item, the price goes up and spurs research into alternatives.
We "used up" easy whale oil, as the number went down, we found something to replace it. If we keep using something and refuse to change, we will run out. Whales would not be able to provide what we need now. We would be our of them.
Oil is not unlimited. some places it costs $15 a barrel to get out, others $98. But when the price goes up, bio based oil becomes competitive around $99.
The key is being willing to change.
We can't keep using coal as a power source. Is natural gas better? in some ways yes, Is Solar better? also in some ways.
While they are not infinite they are limited in price.