my general survival skills are lacking but guns are something I do know and have put a lot of thought into. autism incoming but there's probably not going to be one perfect gun to ride out the apocalypse so it's all about what you're willing to spend, what your personal circumstances dictate you'll be doing should the world end, the laws in your area that dictate what you can currently buy, and what performance characteristics you're willing to compromise on. Also before you pick up a gun, I'd suggest trying to get some training from someone since they do have a learning curve and you need to be instilled with proper safe handling.
Pistols are the easiest guns to keep on your person at all time, which is great because the biggest most badass gun ever made can't help you if it's not within easy reach. There's lots of choices out there for semiauto pistols that should go for thousands if not tens of thousands of rounds with no more maintenance than occasional cleaning, and maybe an easily-replaceable part like a new mainspring or extractor along the way. (Beretta, CZ, Glock, SIG, Walther, HK, S&W, etc- most will shoot well and run fine so it kinda comes down to personal preference. Maybe rent some guns at a local range?) Be sure to pick a common caliber, no hipster shit that would be hard to obtain like .357 SIG or 10mm! 9mm Luger is the most popular centerfire handgun caliber and for good reason- it's the cheapest, it strikes a good balance between decent power and manageable recoil, and it also allows high capacity in a reasonably-sized gun. Budget for accessories as well- grab a bunch of mags, a bunch of ammo, some spare parts like I mentioned earlier, and I'd make sure my gun has a rail so I can slap a weaponlight on it. For a fullsize pistol the Streamlight TLR-1 and Olight PL-2 Valkyrie are two affordable CR123 lights I've had good experiences with, and can be found in the $100 range. Stock up on batteries and see if you can find a holster that will fit your chosen pistol with the chosen light mounted, if not there are shops that can make custom holsters for your specific setup. I for real cannot stress how much you want a good holster. Features like fiber optic or tritium sights will help you get a sight picture in low light, if you decide against the added size/cost of the weaponlight or just want to be sneaky. The downside of pistols are that the terminal effects on bad guys are less impressive than the following choices, and they're also the hardest to shoot accurately since you don't have the support of a shoulder stock.
A shotgun can be a good choice for home defense, but I'd rather have a semiauto pistol or rifle. Still shotguns are affordable, they usually don't require the added cost of mags, they're usually extremely durable and reliable, and 12ga ammo is pretty common. 20ga is less common, but not exactly rare either. Birdshot can be nasty at point blank range but is only good for killing birds at any sort of distance, so buckshot or slugs are what you want (for close-medium or medium-long range shots respectively.) I'd stick with a tubefed pump action like a Mossberg 590A1 or an older Remington 870, probably an 18-20" barrel, since those will last forever and parts availability is great. Get a good sling, get a weaponlight and some way to attach it to the gun, and search around to figure out what might break on whatever gun you have and order spares. Downsides are low capacity, long reload times, fairly high recoil, pump-actions can suffer from malfunctions if you don't work them with authority, and it's not as easy to carry around all day compared to a much smaller pistol.
My preference for home defense is actually an intermediate or pistol-caliber carbine, like a shorter 5.56 AR-15 or a CZ Scorpion EVO with a shoulder brace. The AR-15 will be loud as hell indoors, but is otherwise mild to shoot and a very effective round between 0-250 yards. (That range isn't needed for home defense in urban areas, but it's nice if you're out in the sticks and trying to keep a perimeter on property with clear lines of sight.) Expanding or frangible 5.56/.223 ammo is common and affordable, so are accessories and spare parts. You can build an AR from scratch with fairly minimal hand tools, so with the right tools repairing them yourself is entirely possible. Decent ARs are all over the place and they aren't that expensive, just look for one with a 5.56 or .223 Wylde chamber matched to a C158 bolt and 4150 CMV barrel. Get a spare bolt and small parts kit, they're readily available. A good red dot or 1-4x scope like an MTAC work great on those guns, depending on how far you think you'll be shooting. Pmags are good, Lancer L5AWMs are prooobably better overall? Alternatively some pistol caliber carbines like the Ruger PC or some AR-9 models will take mags from pistols, which means you could get a rifle/pistol combo that draws from the same pool of magazines and ammo. Carry the pistol just in case, and grab the rifle if shit goes down. Most pistol ammo will get a velocity boost from the rifle barrel, and it'll be easier to land hits with. Again not as portable as a pistol but both choices are compact, accurate, have low recoil, and will stop an aggressor.
Get some good safety glasses and electronic earpro too. If you really wanna go ham with this end-of-the-world shit there's affordable body armor that can stop rifle-caliber rounds from companies like AR500 armor, because it's nice to be able to be shot at and at least have some of your most important bits be covered