I'd buy whatever you can get ammo for right now, we don't know what the future is going to hold, but don't be paying triple the normal price for a certain gun.
When it comes to caliber, ask yourself what is the price of ammo now and are you willing to pay that price for that ammo from now on? I cannot accept paying $30 for 50 rds of 9mm, that's outrageous. At that price, .40 S&W is a bargain and an equally, if not more effective caliber.
That said, don't be buying something like .25 just because ammo is available, the guns and that caliber serve a very, very specific niche, one that has been shrinking for decades.
Somebody said they wouldn't buy anything that they didn't already have ammo for or the ability to load it and that's 100% correct. I intend to buy a .45-70 eventually, but I have absolutely no bullets, brass, LR primers, or dies and I'm not gonna buy factory ammo, so that isn't happening for a long while.
I would be very hesitant to buy anything in 9mm right now. It use to be you buy the common calibers because the ammo was cheapest and always available, but we're seeing a weakness now where the most common calibers sell out the fastest and what you can't get is useless no matter how popular it is.
Get what you can get and get what can shoot more than one cartridge. 10mm's are great, seems near all of them not a 1911 can run .40 without issue and .45 revolvers that use moon clips can all shoot .45 GAP, some .32/.327 Mag revolvers can shoot .32 ACP without too much trouble.