The two main things that matter with handgun calibers are shot placement and penetration. There's no reliable way to quickly take down a threat with a handgun. You either have to hit them in the central nervous system or make them bleed out. The first is hard to pull off and the second takes time. You can try aiming for the head/spine or the pelvis to immobilize them but you should be aiming in the center of mass because pulling off trick shots and shooting to wound will make you look reckless in court. If you have the time to carefully aim, it's hard to argue that your life is in danger and you can't retreat. There's also the threat of shooting innocent bystanders. Don't shoot to kill or wound, shoot to stop the threat. A long gun may be capable of reliably stopping a threat but you probably won't have that with you outside of the home. If you're interested in home defense rather than carrying, get a long gun.
My preferred caliber is the 9mm. It has a manageable recoil(shot placement) and is powerful enough to reach the vital parts of the body(penetration). Testing has been done with the 9mm and it has been shown that it can reach vital organs even in hard scenarios. I'd recommend looking up ballistics tests to see for yourself. Handgun calibers have come a long way and all of the handgun calibers are better than what they used to be. Make sure to have a hollow point bullet. It's more likely to hit something important, helps to prevent overpenetration, and makes it obvious the direction where the bullet came from. 9mm fits the niche of being strong enough to have sufficient penetration but without compromising shot placement and capacity.
As for the other calibers such as the 357 SIG, 40 SW, and 45 ACP, they each have problems. For starters, they are all more expensive than the 9mm. You need to be proficient in your gun and that means going to the range regularly to train. The price of the caliber affects how much you can train. Another problem is availability. 9mm is the most common round. It's the most likely to be stocked. It's going to be a common round in a disaster scenario. Another problem is recoil. It's harder to make follow up shots with these calibers. More pressure in the chamber can adversely affect the longevity of the gun. There's also more noise and a bigger muzzle flash in shorter barreled guns. Guns with bigger calibers often have to be wider which affects concealability. It's uncommon to see extra pressured ammo outside of 9mm or 38 Special.
I may consider a 380 ACP if I decide to go with a smaller gun. I wouldn't go lower than that. If you have either a 38 Special, 357 Magnum, 380 ACP, 9mm, 357 SIG, 40 SW, or a 45 ACP, there's no pressing reason to switch to another caliber. None of these calibers make you poorly armed. Smaller ones may penetrate insufficiently and bigger ones may be impractical to carry but all of the rounds mentioned are usable. Defensive training is far more important.