With handguns, the most overlooked factor is fit and ergonomics. What size are your hands? Some pistols are more customizable than others as far as grip size. Borrow or rent some at the range to see what you like.
What are you doing with it? Will you be carrying it every day, learning to shoot, shooting IDPA…all these play a role.
If you are just starting, and you want to learn to shoot better than 99% of police officers, learn with a .22 (that’s my advice, as a firearms instructor and life long pew pew enthusiast)