You don’t really need to see a WW3 to experience things getting expensive or really hard to get. We had that during COVID and a few years after. In a way, WW3 could be rephrased as prices being unaffordably high for the next 20-50 years.
Just with the Strait of Hormuz being closed, I think shortages are going to be coming no matter what, and with that on top of the active wars and global political instability, there’s a risk things will break in ways nobody expected.
The things to stock up on are what’s already hard to get (medicines), or whatever’s cheap but you couldn’t live without. Pretend COVID is coming back and you’ll do ok. But stick to perishables, because probably nothing will happen and you’ll want to consume the stuff in that case.