DISCLAIMER: Owning a firearm is illegal in some places. If a permit can be obtained in your location, please obtain the permit before acquisition of any firearm, and please acquire them through the proper channels (FFL dealer). You are solely responsible for any damage you cause to properties or people, and it is not my responsibility nor will I be held liable for your actions.
This is a tough question to answer. The answer is, YES. The type of gun is also crucial to think about. Handguns are more portable and can be worn on a belt. But you need to be able to shoot well with a handgun. Shotguns are easier to shoot and hit the target, but it is heavier and not as portable (though there are great packs that can holster a shotgun.) Rifles and AR style guns are good, but again, you need to be able to shoot well, and they are definitely not compact. Although with a $200 tax stamp, the proper ATF form, clearance and approval of the purchase of a SBR (short barrel rifle) AR-type rifle, you may be able to own a compact rifle which still requires you to be an excellent shot but can be used close quarters (some states don’t allow them.)
Why do you need one in the first place? When things get bad, people get worse. People who are the nicest get into instinctual mode, and aren’t as nice as they used to be. The people who weren’t nice to begin with also get worse, and will kill you and your entire family just to get food and water. Trust me, having a weapon of some sort will keep you alive.
I will highlight again the true necessity of learning, practicing, and practicing more, when it comes to guns. If you don’t know your gun like the back of your hand, and you can’t use it like you use your eyes, mouth, fingers, and other autonomous functions in your body, don’t bother getting a gun. Your gun will end up killing you and your family than protecting you.
When I trained people on handguns, I make them run 1 mile, and it has to be in less than 10 minutes for the gun to still remain at the bench for them to shoot. Once they got back, the gun is stripped and taken apart (just slide, spring, barrel, lower portion, and magazine), and they had to assemble it, and put the ammo in the magazine in under 5 minutes to be able to shoot down range. Once successful, they must hit the target 10 out of 10 shots within the 3 inner most rings. If they couldn’t do that, they would need to come back the next day for range practice after passing the stress exam. I recommend running a mile then shooting down range, to see if you can shoot like you do walking into a range, looking down the sights and pulling the trigger. It is very different and if you can’t shoot well in stressed conditions, you will die.
For most of you, get a shotgun. You aim in the general direction and pull the trigger. You can hunt with it as well. If you want to get a handgun or rifle, make sure you get years of practice until it is an extension of your body. I am sure I’ll get a ton of nasty comments about this post, but this is what I have learned over the many years I have taught martial arts and survival training, including disarming an untrained person armed with a gun and potentially using it to shoot them.