Actually, it kind of depends. Folks have been saying for decades, "Buy yourself a 9mm, a .308, and a 12 gauge, because you'll ALWAYS be able to find ammo!" Sounded like good advice, so a lot of people did that. As a direct result, when supplies get short, the most popular calibers seem to disappear first. The places I've lived for the last few shortages (going back at least to Obama), had .40S&W, 7.62x39, and 20 gauge available long after every box of 9mm, 5.56, .308 and 12 gauge had disappeared. YMMV...
See my 72. Having some of the off the beaten path stuff is good insurance. Make a good deal on odd ammo then look for the right gun. A local gun store bought whole estates (guns, ammo, books, etc…). Had a bunch of .32-20. Two months later scored a Colt Army Special from a pawn shop desperate to unload such a weird caliber.