More of an economic problem at the moment. We aren't running out of silicon anytime soon, easily accessible silicon, maybe (Might have a word with the concrete industry about that one). Just need to step up our recycling game at that point. Some of the "rare earths" that are used in doping are more of a concern (only rare due to environmental concerns with extracting them). But there are alternatives to silicon that are even more common, so that wouldn't be a big deal if things came down to that. Carbon nanotubes, graphene (And other 2d materials) show great promise for replacing silicon chips.
Really comes down to fabs running with reduced workforces for several weeks/months due to covid, an environmental disaster, poor decision making by some customers (in canceling their orders and losing their allotment), and unexpectedly high demand. Huge risk in building a fab and then finding there isn't as much demand as you thought. We are also constantly seeking more power efficient devices, which is driving constant re-tooling, so even the fab space that exists undergoes constant upgrades which increases downtime. And thanks to poor decisions, the companies that builds the equipment for the fabs is also facing a chip shortage.