butterfly,
...searching for the best option of a firearm to have at home.
You need not be overly concerned with weight and size for that purpose. Classes and training will familiarize you with guns and will be a great help in your selection.
However, do you need security right now? before you have a chance to take classes? If so, then I suggest you go to a gun shop which has a range and will rent, or let you try out, various guns.
Revolvers are simple to operate and in case of a misfire (yes, some rounds are duds) all you have to do is pull the trigger again.
New revolvers have a hammer safety feature which means if you snag the hammer it still won’t fire; it requires that you actually pull the trigger.
Revolvers are seldom more than six shot and some are five.
Automatics have the advantage of more rounds than in a revolver; ten to fifteen. However, in case of a misfire these have to be cleared before another shot is available.
Automatics have safety features but you should get a firm understanding of how these work and what these will do and won’t do.
Long guns? Shotguns are mean, mean, mean; but unwieldy compared to a handgun.
Whichever way you go there is always the fact that bigger, meaning more powerful, is better; bigger also means more recoil but a heavy gun helps with that.
One thing about advice is that almost everyone believes that what they have is the best solution. Sometimes advice is really someone defending their purchase.
A .22 is the answer only if you cannot handle something bigger. Sarge gave some good advice, IMHO.