I have multiple pistols in 9mm, .40s&w, and .45acp.
My thoughts:
9mm: Will kill a person dead with proper shot placement. Personally, shot placement is not a guarantee and no matter what anyone tells you, you will miss you shot sometimes, especially in a deadly scenario with adrenalin that you are used to.
.40s&w: is the best all around round. Best capacity vs size. Cheap to buy. It is everywhere. Best ballistics. With Hollow Points it will stop a person if you hit them anywhere.
.45acp: my favorite when running suppressed. Un suppressed it is slow. But still effective. The low capacity of firearms that shoot it is a negative. Expensive.
Overall, the .40s&w is the best. However, all three of them will kill a person if you use it properly. But as preppers we have to look at other characteristics other than deadliness. Availability? Etc.
Personally, I conceal a .40 Glock 23. However I also carry a 10mm Glock SF when I am not conceal carrying. Overall, with no caveats like availability or cost, the 10mm is the best round I have ever shots for deadliness. But it's cost and availability is a no go for preppers most of the time.
The main thing is to purchase a firearm you like the feel of, can shoot, and are comfortable with. Then spend the same amount of money that you spent on the gun to buy as many magazines as you can. Then stack ammo as deep and wide as you can.
Good luck!