I remember these wise words whenever we get in a newbie what gun thread:
A thought for today from John Holschen:
Amateurs think (or talk) equipment,
Students think techniques,
Masters think tactics!
An example, the French had the Chassepot rifle which was so superior the Prussian needle gun. It cost the Prussians most of their casualities. The French had their clocks cleaned.
There's a lot of wisdom in the above post, and on that note, I observe that most postings in this thread have addressed equipment.
But before one can be a "Master", you gotta move through the stages of being an amateur and a student. Nobody enters the game as a master. (and by the way, I'm not claiming to be a "master." I'm speaking from the perspective of 35+ years of military and LEO experience, having reviewed hundreds of shootings, having been the on-scene supervisor at more than 20 deputy-involved shootings, and as one who is still working on mastering the subject).
Handguns are carried for convenience. They're small, compact, and easily pointable compared to long guns, but they're also generally do not produce an immediate incapacitation and the terminal ballistics of handgun rounds are far less than those from long guns. With that quality of terminal ballistics, shot placement from a handgun is far more determinative of outcome that is caliber, bullet characteristic, or weapon type. Forget about arguing whether the Glock 19 or a 1911 is a better choice, all that discussion does is cement you in the amateur category. Cops carry handguns because they should always be on the belt when needed, but when armed conflict becomes predictable, they go for the shotgun or carbine. There's good reason for that.
Defensive weapons should be kept simple, and intuitive. Every added gadget is one more thing to go wrong, and one more thing for you to forget under the extreme stress of a shooting situation. At the ranges involved in home defense engagements, they not necessary. Every rule has an exception, and I'm inclined to make an exception for a light source. I'd prefer to keep the light source away from the weapon, but that limits your mobility and there are a lot of good weapon lights out there. You need to ID your target and you can't do that in the dark.
I'm "old school" and prefer the shotgun. With #4 Buck, you get 24-27 "Bullets" downrange with every pull of the trigger. One impact with a shotgun blast will be more immediately incapacitating that a single round fired from any other weapon.
But carbines are also becoming popular. A well placed round will likely be immediately incapacitating, and you can carry more rounds.
Long guns have a tradeoff of "pointability" vs "handling." When you start firing a number of rounds, that pistol-grip shotgun is gonna show some drawbacks (and I'll bet that you're gonna start shooting over your target). A stock helps a lot, but makes your weapon less maneuverable. Suspects tend to move fast and even faster when they think they're about to get shot. You need to make sure that you can control your weapon with similar speed.
There were two signs that my agency's range training facility that summarized a lot of thoughts in just a few words: "Speed is good, but accuracy is final. You need to learn to take your time in a hurry." and "Fear the man who owns just one rifle, he likely knows how to use it."
The second quote illustrates the need to train with whatever weapon you choose. Train to the point that the weapon's operation, and manner of clearing casualties becomes intuitive. Then you don't gotta worry about whether the safety is on the tang, or trigger guard and you gotta worry if the recoil of a 12 gauge is more problematic than a 20 gauge. You'll be used to it all.
Then start thinking about how you would employ your new skills in the defense of your home. Study shootings that have occurred, and how the involved folks reacted. Then play a couple of "mental gymnastic" exercises applying the same to your home.
Then keep it all up because these are perishable skills.