Step 1:Get a 9mm compact/full size sized gun from one of the major manufacturers:
Glock G19, Sig p320, S&W M&P 2.0, HK VP9 , CZ p10C/p07c. (if you are going the polymer route)
They are all good. Glock is the most boring (accurate, reliable, durable, inexpensive) and therefore the best
Step 2: Buy a case of not total garbage ammo 115gr FMJ (blazer blass, american eagle)
Step 3: Shoot half your case of ammo, and buy another case of ammo.
Step 4: Repeat
Personally I think a first gun should be a general purpose gun. I would get a gun that is simple and boringly reliable, don't overthink it.
Something you can take to the range and build confidence and skill. If you get a too small gun, it's not going to be very pleasant to shoot and therefore you probably aren't going to practice as much as you should.
Also suck it up and buy a case of range ammo from somewhere like target sports so you don't feel the burn of buying a box at a time from the LGS or god forbid the range. Make sure your gun works and learn how to run it and clean it.
Also recognize that your first gun is only the first gun. For your second, third, or 34th gun you can branch out in to special purpose guns and fun guns.
A subcompact-carry (Shield, P365, etc) is a great second gun.
Welcome to the gang!