Buckshot works, but has serious negatives, and no advantages over a 223 round.
At home defense ranges the pattern is so tight that you might as well use a rifle.
Both rounds work about equally well, but buckshot has a VERY limited useful range. Inside of 10 yards a handgun is probably a better choice than either, and a carbine is just as effective as a shotgun because of the tight patterns at that range. Buckshot is at its best between 10-30 yards. At these ranges it is in a pattern large enough to make hits easier and still tight enough to put several pellets on target. Beyond 20-30 yards a rifle is always a better choice.
The carbine is smaller, more compact, lighter, and holds up to 6X more ammo.
The 223 rounds are LESS likely to overpenetrate and cause unwanted damage. It is safer for innocent bystanders.
Buckshot will deliver around 28-30 ft lbs of recoil vs 4-5 ft lbs of recoil for 223.
A shotguns ONLY advantantage is lower weapons cost. But the price of 223 ammo is far cheaper than buckshot making practice cheaper.
The shotgun is DEAD for LE and military use except for non-lethal loads and door breaching.