1. Diversify. Try to have a different gun or conversion barrel for a gun you like in a variety of calibers.
2. Keep a reasonable amount of ammo on hand. Whether it's a crisis, an oppressive law, the rumor of an oppressive law, or a bad election; we've seen a lot of runs on ammo over the years.
This, exactly this...
I don't get the question on this thread...
You would see a lot more posts (from those of us around long enough to really remember the past shortages/runs) along the lines of 9mm being the
first to disappear. The only place you'd see people talking about 9mm being available when nothing else is, would be those strange gun forum dystopia dreams some have of civil war when they talk of government stockpiles of 9mm and 5.56 making it the only ammo available. How? I'm not sure. If everything is banned (or gone), what do they envision? Having government forces recognize you as one of the good guys, and things are so bad that the troops/federal law enforcement enlist you as an ally and give you ammo? Or worse, taking it off the bodies of dead feds/soldiers in some civil war? Both very unlikely scenarios, so we are back to, anyone who has been paying attention knows that 9mm is the first to disappear.
So, back to the themes of many of these answers...
Either spend a few bucks when ammo is available again and stock up for the (inevitable) next shortage, or buy guns in a few calibers, including a few less popular calibers that are less likely to disappear so fast. Or, like me, do both. In pistols I have 9mm, .380, .45acp and .40S&W, in revolvers I have less variety, but I have .45LC, .357mag and .38spl. I also have a small stock of 9mm, .40S&W and .38spl (plus .45LC and .38/.357 reloading components). If you stock up on ammo, 9mm is probably easiest since it is the cheapest, and being a tad smaller, it takes up a little less space than .45 or .40S&W.