A very close family friend who's a police officer recently told my sons (relatively new homeowners) that the best home security measures are good locks, alarm systems, fencing, strong lighting, uncluttered landscapes so windows and doors are easily viewed from the street, nosy neighbors, and large, noisy dogs. This next part was a surprise to me - he strongly recommended AGAINST handguns unless they are willing to practice target shooting very frequently.
As he said, police officers are PAID to practice shooting and required to do so regularly. Even so, in an actual emergency with a real perp, most cops miss their targets more often than not.
He said in a burglary or home invasion robbery, before most people have figured out what's happening and gotten their guns out the "bad guys" have already drawn their own weapons. They then disarm the homeowners, giving them even more firepower against the victims.
Explains why we almost never hear news of burglars being stopped by gun-wielding defenders. (Not saying it doesn't happen, just that it's relatively rare - especially considering that the US is armed to the teeth.)