Welcome to the forum! If you haven't already done so, please take a few minutes to familiarize yourself with the Forum Guidelines
You can't beat a .22 to learn on. No recoil and cheap ammo. But, it's not going to be a great self defense gun. If your budget allows the purchase of a .22 and gun in a caliber that would be good for self-defense, absolutely get the .22. However, if you're like most of us and the money tree is looking pretty sad these days, IMO, you should get a good all-around gun like a 9mm. Easy to manage, good SD abilities, and ammo is relatively inexpensive. If you tell us your budget, then we can make some recommendations as far as brands to consider in your price range.