Hand guns need a lot of practice which is cool if you're into it. A compact shotgun will hit what you point at without too much risk of over penetration. Didnt Durka make a post about shotguns for home defence?
I have both Sig Sauer P250 and Ruger P95. Baught them before Christmas. They are hard to get now, and nearly impossible to get 9mm ammo. Sig P250 is modular and it doesn't have safety, its a single cock hammer, like a old revolver.
Shotgun is not the best answer. at 10 yards it will leave a hole big enough to put your fist thru if is a 12 ga. and will punch a big hole up close, and still punch thru walls. pistol best small hole is easyer to pacth up. just be carefull when aiming.