There are lots of issues - if you decide you need a defensive weapon at all ...to take into consideration / kids - no kids, how to secure it, how accessible does it need to be, what is the average response time to your residence for authorities, civil lawsuit issues if you use the weapon, depending on where you live...penetration may be an issue ...and on and on ...../ and yes, most any handgun caliber from 9mm - .45 acp --.357 mag will easily penetrate a wall / so if you choose a handgun - you have to know what your lanes of safe fire will be ...and you have to think about all of this stuff long before you put, or load, any defensive weapon in your home..or into a holster on your belt.
I'm not an instructor or a LE Officer ...I suggest that everyone seek out classes and professionals in their area for training...whether its handguns, shotguns or rifles. If you don't have a lot of experience with a variety of guns ...then visit your local range often.../ and I think you'll find a lot of folks willing to help you out / hopefully you have a range locally where you can rent a lot of different guns before you buy.
I've been shooting and hunting ...for 50+ yrs.../ and I own 50 or so guns...and I've used or owned most of the popular firearm platforms.../and if someone were to break into my home, when we are there, they will run when they approach me - or they will die ! I have made that decision...and I am armed appropriately in my view / for my environement / for my expected risk level - which is very low in my opinion in my area. But in a big house / neighbors not too close / no kids...its easy for me to say a 1911 in a .45 acp ..will do everything I need to do / and if necessary ( and it probably won't be ) I could fight my way to my gunsafe..and ammo storage.
I pick a 5" 1911 in .45 acp ...because its the gun I shoot the best...and I train with it weekly ( 2 to 6 boxes a week ) ...doing a number of tactical drills, double taps, reloads, etc ..../ I train just in case ( I take classes because I like them / and I like to shoot ). I expect to never have to need a gun ...so mostly, I train - because I like to shoot ..and keep my skills at a level to make it fun for me - and competent. I'm not a master class handgun shooter ...but I can draw and double tap a silhouette ( on target -center chest ) inside of 30 feet 99.9% of the time ( in under 2.5 sec ) ...is it fast enough, I think so ...worst case /it'll take me a 3rd shot ...and its over.
So I choose the weapon ...that is the most reliable, most nimble, the gun I train with often, the gun I shoot the best...in a caliber that suits me. I would be just as comfortable with a 1911 in 9mm...( with good defensive ammo in it )....
If you decide you need a defensive weapon - not everyone does ) ...but if you do, budgets are certainly part of it. Tactical shotguns are cheap ...but even in 18.5" barrels...they're still clumsy. A round like a slug ..doesn't spread ...but neither does OO Buck .../ it probably won't penetrate as much as a 230gr bullet from a .45 acp ...but it depends what you hit ( sheet rock ...is pretty soft )...
Shotguns can be inexpensive to train with ...train with some bird shot in 2 3/4" shells...and train twice a month ....fire 2 ...reload...fire 2 .../ work the action ...can you double tap a target in under 3 sec from the ready position. If you can't ....do you have a defensive handgun caliber -that you can do that with ...( most good 1911's will cost you a lot of money / maybe $ 1,000 or more easily ) ....but there are good handguns on the market like Springfield XD-M for $ 600 that are very good defensive weapons..
I was ragging on this idea ...that everyone needs a 3 1/2" chambered pump gun...or they are "under armed" .../ in my view, while a pump gun with a 28" barrel will be even more clumsy than a 18.5" barrel ...maybe its all you need - to hunker down / until the cavalry arrives in a few minutes. Its "Defense" ...not "offensive assault " ...that you're after...
if you were to buy a decent pump gun in a 28" barrel ...and have some fun with it ...shoot clays, hunt, whatever...its my contention you'll have more fun with it / be more competent with it - if you need it for defense...and the expense is easy to justify ( a Browning BPS hunter model is about $ 650 ) and its a gun you will probably have a lifetime / and have some fun with.
My boys are in their 30's ....and most of their buddies...went out and bought tactical 870's ....and going on 5 yrs or more ....not one of those guys has fired their tactical guns / because they're not fun. They have all invested in other shotguns ...semi-autos, Over Unders, etc ...for clays, bird hunting...and they have all gone to a variety of handguns for home defense...even some with S&W revolvers...which I like very much as well. I think a gun like a S&W model 66 - .357 mag ...in a 4" is a very practical, and inexpensive ...home defense gun .. $ 400 - $ 750 ...depending on condition. Easy to use /easy to train with ...you can train with .38 spl ..and load it with .357 mag for defense.
Now ...if you don't train with it ....and can't hit a target 18" accross ...99.9% of the time ...its a bad idea. But that applies to shotguns as well...
There is no ...one answer for everyone...
But if you're new to all this stuff ....get some time with a lot of guns ....make the decision what you want to do ( shoot some 18.5" 12ga shotguns ...and see what you think ).... I'm 61 yrs old ...but I'm 6'5" and 280 lbs ...I can shoot a pump gun with an 18.5" barrel ...I just don't want to ! But its also because I train with my defensive platform of choice...a 1911...because I like to shoot .../ and I like handguns.../ I have a few pump shotguns ..and a lot of target shotguns.../ I do not need a tactical shotgun or a tactical rifle like an AR...but that's me, you should do what's right for you ...including just pursuing this as a hobby ...if you want to.
My rant ...was directed at the attitude ...that I think too many guys hear on the internet and in gunstores...and it makes them think, they're not safe, unless they have a tactical shotgun. It aggravates me.../ and not that you took it that way - but it wasn't directed at you ....it was directed at the attitude ..and what I consider a lack of knowledge...( because they're just trying to sell guns )....and I think its sad that they're taking advantage of a lot of guys... I love shotguns ...I just don't think everyone needs a tactical shotgun to be safe ...nor is it the most effective defensive weapon for everyone. It may be for you ...don't let me talk you out of it ...or someone else into it ...decide for yourself !