wow... I ramble.
The answer is going to depend on where you are, who's in office at the moment, bunch of things.
9mm/.380 range is below almost all the choices listed here, as far as power level. .40 is a larger and more powerful cartridge than 9mm. The only cartridge I can think of, really, that fits in the 9mm/.380 range would be .38 Spl.
When I choose a gun for a reason, such as self-defense or shtf, I like to consider that, even though I can make ammo cheaper than I can buy it, I may run into a situation where I left my reloads at home and I'm out of town... what caliber do I want to be looking for? Certainly .38Spl, .357Mag, 9mm, .45ACP, .40S&W, .44Mag, .30-06, .308, .22LR. I don't want to be trying to find .45 Colt or .357 Sig.
With a semi auto, you're not going to find a multi-cartridge because the power of the cartridge works the action; so it needs to be very consistent from shot to shot, so you don't over-work the action or fail to cycle. You can with a revolver or other manually-loaded action use varying length/power in the same caliber, such as .38/.357 (the numbers lie- they're the same size); .44Spl/Mag; .45Colt/.454Casull/something I don't remember (maybe two more) that all function in the same gun; .40S&W/10mm are the same caliber, but you can only use 'either' in a revolver. Rimless cartridges in a revolver is beyond the scope here so forget that.
Anyway, so the point being, I might choose a .44Mag that I like to shoot .44 Spl in a lot. I load my own but if I'm stuck somewhere and have to buy commercial, I can find real ammo in .44 Magnum a lot of places (but it's not cheap); I may be able to find good .44 Special ammo but it's not cheap; I can probably find 'cowboy load' .44 Spl some places. The idea though, is I can use several choices.
A .357 Magnum revolver is the most versatile gun there is. Made of real steel, not some lightweight. Medium frame, 3-4" barrel, with or without adjustable sights. S&W 19 or 66 (same gun, 66 is just made of stainless steel instead of blued or nickel plated carbon steel) for adjustable sights, 15 or 65 with fixed. I like the fixed better for just about any use except target shooting, but you can make do.
Every gun collection either has one or needs one. No reason it shouldn't be yor first gun. Shoot .38 Spl for learning and practice (this is the only "only gun" gun there is- if you can have two, get this and a .22) with several stages up to full .357 Magnum and in a package that can be concealed; there just ain't no such animal as a gun that beats it for versatility.
Oh, we were talking about cartridges, huh.
You should use the most powerful cartridge you can control well, and that's not to be determined in one cylinder-ful and being scared by the recoil of something like a Magnum. In a good standard revolver, .357 is plenty controllable by most people.
In a situation that has gotten so awful that you are about to freakin' SHOOT SOMEBODY, you are going to wish you had a bigger gun. Carry all the power you can handle.
Then buy LOTs of ammo and start reloading to make it more affordable.
sorry for the meander.