A hit with a .22 beats a miss with a ,45, every time.
The fact remains that a gun is a last resort and then you must have it with you, timely deployable and not hiding somewhere in your home were it is almost unaccessible.
There are more practical practices and measures to make you, yours and your environment a hardened target less welcoming to small thievery.
Mental readiness, awareness of your surroundings, being able to detect what/whom doesn't belong in the picture or it's out of place, sensing the mood of a place or situation are the common elements that should prevent you from walking into trouble.
There a bunch of excercises, practices and tactics you can easily develop into habits. Some you can learn and teach to/play with others as games.
Plenty to go about.
Am a big fun of guns, actualy did a few courses at a reputable academy in the US 10 years ago up to CCW pistol instructor course.I could teach you how to shoot a firearm and all the following stuff up to defensive shooting BUT that is not what you need. That takes years of practice and preparedness. If you're simply going to buy a gun and learn to shoot it only to keep it somewhere at home that ain't going to be of much use and is likely to become an additional BIG problem when SHTF. Shooting targets and shooting another human being under stress ain't samo-samo.
Do yourself a favor and research preventive measures. Both passive and active ones.
A guns is a last resort and then you must have it with you, timely deployable and not hiding somewhere in your home were it is almost unaccessible.