Very good advice; all of my most recent acquisitions have been used guns, including a Colt revolver made in 1960. But that’s more by choice, since the guns I acquire these days are older, out-of-production models.
A quality handgun that has been maintained will easily last a century. The .22 Long Rifle cartridge has been around for more than 130 years; Smith & Wesson introduced the .38 Special cartridge in 1899 along with a revolver designed for it. That revolver, with some changes and improvements, is still in production today as the Model 10. It’s even offered in a stainless steel version as the Model 64.
However, someone new to field would be well-advised to do some research. The sheer number of different brands and models can be daunting and some older and out-of-production handguns actually appreciate in value. In addition, there are some that might be better avoided. Google can definitely be your friend when it comes to checking on a particular handgun because you can learn which ones are likely to be the best candidates for that first handgun.
One caveat: Many modern handguns incorporate internal safeties that either immobilize or block the firing pin. However, some do not and some of those can discharge if dropped or mishandled.
If at all possible, have any pre-owned gun that you are considering checked out by a competent gunsmith. Sometimes that is impractical but you can always ask the seller if the gun can be returned if a problem is discovered.
To be honest, if you are considering a semi-automatic .22-caliber rimfire pistol, I really would recommend buying new. The reason for this is simple: as their suggests, the cartridge is fired by the firing pin striking the rim. Dry-firing a rimfire handgun without a dummy cartridge allows the firing pin to impact the chamber, which can damage or break the firing pin. Since you have no way of knowing if the previous owner made a practice of dry-firing without something to absorb the impact, it’s crucial to have the gun checked by a gunsmith. This adds to the total investment you’re making.