Take a hint from law enforcement:
All these used Glock 9's are from PD trade-ins going to 40 S&W.
9mm w/ 124 Gold Dot HP is a killer.
40S&W is better, meets FBI standards formulated after famous Miami shootout.
45acp IS the bench mark to which all pistol rounds are compared.
In Federal LE : 40 S&W is king except Secret Service is 357SIG.
Texas DPS went from 45acp to 357SIG and has had Great Results.
California CHP went from 9 to 40 S&W and has had great results.
But remember, as Clint Smith says @ Thrunder Ranch...IF you brought a pistol to a gun fight...you didn't plan well !
Enter the 12GA shotgun or Urbine Carbine in 223.
Econmoics have a consideration....shoot some and see what feels good in the hand and is controllable. Learn to reload if you start to shoot a bunch and save more on ammo. Have a secure way to store your guns.
Test anything you choose in advance with quality personal defense ammo...FMJ hard ball is suitable for practice only. In 9 or 40 it may over penetrate and may bounce on hard surfaces. What ever cal you choose, load it with defense ammo like local police use....helps in court later.
Take some instruction at a local NRA gun club is a good starting point !