Never buy a gun that doesn’t fit you. That goes for rifles, shotguns, and even handguns. Just because you can hold it in your hands doesn’t mean it fits.
Try out a bunch of different models to see which ones you most like for weight, size, and simply how they feel to you. If the grip is too small, it’ll feel wrong. If it’s too big, it’ll feel unwieldy. Sometimes a grip has protrusions that don’t match up with your hand. Feel for those oddities, too.
Once you’ve narrowed it down to a few you want to give a closer look to, look a little closer. Check where your finger lands on the trigger. I like to pull the trigger with the pad of my index finger, but I know some people prefer to use the joint instead. Whichever way you pull the trigger, make sure that’s where your finger lands on it when you grip the gun.
Then cycle it through a few dry fires. Check the weight of the trigger. If it’s adjustable, find out how easy it is to adjust it. Most handguns are set by the factory with an insanely heavy trigger pull, but many of them can be easily adjusted. Even if the gun doesn’t have a trigger adjustment built in, you might be able to replace the trigger without having to spend a fortune. So if you don’t like the trigger weight, it can likely be fixed.
And then check the pointability of the gun. With your eyes closed, hold the unloaded gun pointing in a safe direction, but low. Then raise it, still in a safe direction, until you think it’s pointing at what you determined to be the target. Then open your eyes. If it’s pointing high, the grip might have too steep an angle for you. If it’s low, the grip might be too vertical.
Pick the gun that fits you best. You’ll shoot better with it, and you’ll practice with it more.