I was going to post a thread about this once I actually got my hands on a gun.
You want to make sure your photo ID is up to date as even the slightest discrepancy will make you ineligible for purchase. Usually, that would just mean the dealer tells you to get it updated. If your state is extremely restrictive like mine you'll probably need to get a permit to purchase or a concealed carry permit depending on the gun you want to buy. I want a .45 caliber pistol so I'd need one of those. Permit to purchase you just submit a form to your sheriff and they do the exact same background check a dealer does. Concealed carry requires taking a firearms class. This can be done online but you have to show up to range day in-person. You'll learn gun safety and when you can use a gun in a defense situation, and how to use a gun. This usually doesn't take too long.
Then you go to the dealer. This is the hard part. They're gonna ask why you want a gun, what kind of gun you're looking for, price range, caliber, what you'll use it for, how often you'll use it, etc. Dealers overwhelmingly stop most gun purchases. The government doesn't do shit other than check if you've been involuntarily institutionalized and if you're a criminal. I've seen stories of dealers rejecting a purchase simply because someone was so eager to purchase a handgun that they didn't even want to hold it. If you act like a normal person that isn't very agitated you'll be fine. The dealers are mainly asking the questions just to see if you're sketchy but also to try to help you make the best purchase. You don't have to be a gun nut you can just say "I want a gun for self-defense but I'm not really sure what I should get" and they'd help you, that's why they're asking the questions they want to help you make the best purchase while gauging if you're going to be nefarious.
Once you make your choice. You fill out one page (depends on the state) of paperwork that's basically just giving them your information and consenting to allow a background check. Background check goes through, a few minutes pass and you have your gun. Unless you live in a state like mine, then expect to wait for several days because reasons.
Of course, you're not getting it for self-defense so you'd wanna be specific about what you want while claiming you want it for self-defense, hunting, sport, shooting range, fun, whatever. Shotgun slugs are gonna be really effective on you. A 9mm pistol to your skull will not unless you aim correctly to hit the brain stem. That's hard.
Sorry for the text wall I tend to be a little over-detailed.