The great thing about a free market economy is that, as the Nobel laureate Friedrich Hayek pointed out, it is a decentralised problem-solving device. If the price of something rises, suppliers respond by raising output while customers use it more efficiently or switch to other things.
Of course, we cannot predict how specific people do this. But that’s because, as Hayek stressed, they have localised specific knowledge of production processes and opportunities that we don’t have. Which is why markets work better than central planning.
If this is correct, then inflation caused by localised shortages can only be a temporary phenomenon. Rising prices induce behavioural changes that cause prices to fall.