I have always been told that a shotgun was the best home defense weapon.
If nothing else, the terminal performance of 00 and #1 buck are just absolutely devastating, at typical CQB (home-defense,
inside the home) distances.
I thought that Greg Ellifritz's writeup was excellent:
https://www.activeresponsetraining.net/choosing-a-buckshot-load-for-home-defense
The bane of shotguns is patterning - actually, it's incorrect of me to say that this is the downfall of the shotgun: rather, it's typically the downfall that WE as the shooter/operator of the shotgun suffers from.
Taking the time to pattern one's shotgun, using one's chosen defensive load(s), is absolutely critical.
This was a great analysis of an OIS where the officer utilized his shotgun to end a hostage situation. I don't know if there is a full AAR for this shooting somewhere, but the distances would suggest that the officer perhaps did not slug-select, and likely utilized a duty 00-buck load to end the threat.
Even today, we'll find many folks who insist that aiming with the shotgun is not necessary or that a shotgun's spread makes it unsuitable for defensive use at-distance. Both of these myths are not only wrong, but outright dangerous.
On the other hand, when the user knows how his/her shotgun will perform given its load, the shotgun is an undeniably devastating weapon.