You will get a million opinions and none are really wrong. It’s all personal choice.
If you’ve never shot a handgun or have very little experience with them, I would get a .22LR. It’s very difficult to shoot a handgun well and very easy to shoot one badly. A big loud caliber can induce severe flinching which may slow your progress and enjoyment.
Personally , I would get a .22 revolver like a S&W M617 or M17. They are reliable and easy to shoot. They are a K frame all steel gun which will last forever. And great for training kids too.
I would get a 9mm semi auto to back up the .22. You will find .22s get a bit boring after a while. Get a CZ Shadow SP-01 or a Walther PPQ. They have the best in class trigger for their category and are not super pricey for quality guns.
Here’s a tip. Resist shooting anything bigger than your .22 until you can consistently put 10 rounds into one tight group at 7-10yds. Once you master that skill, you will be able to shoot any caliber and action.
And lastly, get good training early. You don’t know what you don’t know so don’t fall into bad habits early.
Good luck!