In general, don’t listen to anyone on this board recommending a gun or caliber.
Pistols, like all firearms, are tools to a task AND there are personal considerations to take into account.
First, take a course like Basic Pistol from the NRA to learn what you need to consider. The types of pistols have have their own pluses and minuses. Then the pistols within each group has their own pluses and minuses. Then there are pluses and minuses on those pistols by caliber. This all has to be consistent with you personally and your intended use.
This message brought to you by the good people at MJT Firearms Training. You can find further information on their Facebook page.
TY