As has been suggested earlier, consider how much time you have available to enjoy learning and taking part in your new hobby. It can be a once every couple of months visit to the range hobby, or a three times a week 52 weeks a year or more hobby. Start with a .22 and shoot affordably until you are able to put all your shots into the black of a regulation bullseye pistol target at 25 yards, then consider getting a centre fire pistol. Repeat the learning process while adjusting to additional noise and recoil. With either firearm recognize that you will spend more for ammo over the first two years than you did to purchase the pistol. You will also spend more than the cost of the pistol in buying memberships at a range or two over the first couple of years. Range membership expenses will continue for as long as you own the pistol, whether you shoot it or not. Of course if you take a course to allow you to get involved in an "action" shooting sport, ( like IPSC, IDpA, Cowboy Action, etc.) you can spend lots of money on the initial training, holster, belt, electronic muffs, magazine pouches, range bag, and the several thousand rounds of ammunition often consumed in the first year of "learning the game".
Just as in many other sports or hobbies, you can choose your level of involvement, but often the racquet, or snorkel and fins are the least cost items necessary for participation. Give it a try without breaking the bank. Add to your "kit" as your skill and interests grow. Who knows how much fun you will have over the next 50 or 60 years.