It all depends on how much you want to spend on the gun,,,
And then how much do you want to spend on ammo.
.22 Rimfire guns often cost just as much as centerfire pistols,,,
But the ammunition for them is considerably cheaper,,,
The best .22 ammo runs about 7-8 cents a round,,,
9mm ammo costs at least 20 cents a round.
Owning a gun you can't afford to shoot is no fun at all.
You will get many recommendations as to what pistol to buy,,,
My take would be to analyze your desires,,,
Then match a gun to those needs.
There are a tremendous amount of quality firearms out there,,,
My recommendation would be to get a CZ-75B in 9mm,,,
The pistol is very high quality and only $500 new.
These are my CZ's,,,
One is the CZ-75B in 9mm,,,
The other is the CZ-75B Kadet in .22 LR.
Surprisingly the Kadet in .22 LR was $100.00 more than the one chambered for 9mm.
But my best recommendation is to not be in a hurry,,,
Shoot all the guns that your friends own,,,
Then maybe hit a rental range.
Renting guns is also a ton of fun,,,
The money spent on rental fees and ammo,,,
Often keeps you from wasting money buying a gun you later don't like.
If you stick with the good names,,,
The pistols will all be high quality firearms,,,
Find one that feels good in your hands and makes you smile.
Enjoy the hunt for your perfect handgun.