>>126826
I'm going to /k/ autism all over this post. I hope no one minds. Let me spoiler it so no one has to read this who isn't interested.
Do you have any experience with firearms, or with shooting? Is this for protection, or is this a hobby you want to take up? The conventional wisdom is that it's generally best to start off with a .22 rifle, preferably one that has open sights similar-ish to the open sights on pistols. .22 LR ammunition is least expensive and it gets you more bangs per dollar. This is important when you're trying to build muscle memory. There are uncountable articles about the topic online, some of which are not by AI. There are uncountable videos you can watch. There are books printed on paper that you can read about the subject, more than you could read in a lifetime if you made it a full-time job seven days a week. None of that is a substitute for muscle memory, for learning to use the sights until it becomes habitual, until you don't have to think consciously about how they line up. Trigger control is likewise something most people learn best by doing it a lot, over and over, at a range, with thousands and thousands of repetitions, getting instant feedback with each shot. And for most people it is easiest to learn these things with a .22 rifle, because ammunition that costs under ten cents a round is more conducive, for most people, to using in the volume required than ammunition costing a dollar a round. Also with .22 there is somewhat less noise and relatively little recoil, which means less distraction from learning the fundamentals.
You have lots and lots of choices. I don't know what your budget is. There are <$150 semiauto .22 rifles out there. Some designs are better than others. Some tend to need more tinkering than others. The Ruger 10/22 is in the <$300 range and is extremely popular, with an enormous aftermarket, but the stock sights are not especially usable. Wal-Marts have Savage and Stevens .22 rifles (same company, Stevens products are made in the plant in Canada and the products are otherwise identical) but QC is spotty and there are problems with the magazines. Also they are difficult to disassemble and reassemble for basic maintenance. There are lots of .22 rifles made in turkARYANey floating around, sold under lots of brand names, sometimes findable for $99-ish on sale at this or that discount sports outlet store, but the ones I have handled did not seem well made, and the videos I watched showed them to be assembled with numerous roll pins, which have to be driven out without damaging them for reassembly, then reinstalled without damaging them to put the rifle back together after you clean it and lube it after a range session. Roll pins are inexpensive and roll pin construction is inexpensive, which is why they designed them that way, but it makes maintenance difficult, with a non-trivial risk of damage every time.
Once you pick up a basic level of competence with a rifle, in Current Year there is an embarrassment of choices in good quality .22 pistols. There are Ruger Mark IVs for <$400. The Smith & Wesson Victory Model and Browning Buckmark can be found in the same price range. They all have good reputations for reliability and accuracy, and are not too difficult to maintain. Glock makes a .22 pistol now, the Glock 44. They do not have the greatest reputation. They are said to have reliability problems and quality control problems. Some are better than others. There is an indoor range some distance from me that has one for rent. I tried on out and at least with a hundred rounds of Mexican "Aguila" copper plated .22, it ran with no problems. Lots of people who buy them get lemons, though.
Once you become competent and comfortable with a .22 pistol, you may have by that point formed some opinions about where you want to go next. A double action revolver will teach you a great deal about trigger control and make you a better shot with everything else once you master its trigger, for example.
But if you want to skip ahead to centerfire pistols, Glocks have been enormously popular with law enforcement in the US for thirty years or longer. Part of it is that the construction is inexpensive, allowing them to be the low bidder, but part of it is that they are generally pretty reliable, at least in 9mm. Glocks were designed around the 9mm cartridge and the adaptations of the design to other calibers are kind of a mixed bag. Some work better than others. There have been some missteps. There have been lemons. But yeah, you can do worse. The Glock 17 is the full sized service pistol in 9mm. The 19 is just a tiny bit smaller, holds two fewer rounds, and is fairly popular for concealed carry. There is the Glock 34, which is more or less a 17 with longer slide and barrel for target shooting, and there was a 17L with an even longer barrel and slide than the 34 but I think they stopped making it. Not everyone likes the grip frame angle of Glocks. Not everyone is enthusiastic about the trigger, or the factory sights. But they generally work pretty reliably.
Small digression. If this is something you're thinking about for protection, you are probably interested in ammunition with hollowpoint bullets. They have a narrow hole in the front of the bullet and are made to flatten out like a rivet when they hit something solid. This makes them tear a wider hole through soft tissue, and also makes them a little less likely to go all the way through the bad guy. It can make them a little less likely to ricochet. The notches in the copper jacket in the front and the exposed lead core can make the bullet disintegrate instead of bounce if it hits something like a brick wall at an angle, but there are no guarantees here. This is why just about every law enforcement agency buys hollowpoint ammunition, though. One of the reasons I bring this up is that there was a time, and it wasn't that long ago, that lots of semiauto pistols were designed around the older round-nosed full metal jacket ammunition and many wouldn't run reliably with hollowpoints. The blunt bullet shape would hang up on the feed ramp a lot. This is something you still hear about. It was within living memory that this was normal, and you had to test whatever you bought with several different brands of hollowpoints to see what it would tolerate, if it would run with any of them at all. Colt Government Models in .45 were especially infamous for this, once .45 hollowpoint ammunition became widely commercially available in the 1970s. With more modern designs (Glocks and Berettas, for example) this is generally a non-issue, as they were designed around hollowpoint ammunition in the first place and it will generally Just Work. This is not to say that there isn't a lot of garbage-quality ammunition floating around out there, and that there aren't ammunition-related problems that can arise, though from what I see in Current Year it's that some of the cheap brand foreign-made 9mm ammunition being imported into the US has really hard primers and not all guns will set them off reliably every time.
Anyway. Glock 17s and 19s work. Not everyone likes the way they feel or point. Lots of people say the trigger feels mushy in a way they find very distracting, that makes it difficult to shoot them really well, and I can't say they're wrong, though if you are handy with tools it's not difficult to polish the parts a bit, which will improve the feel a little.
Berettas, and I am assuming you mean the Model 92 that the US military issued for a few decades, also generally work, but not everyone likes the trigger. They're designed to have a long heavy trigger on the first shot, to reduce the possibility of accidents, then a lighter trigger after that. Not everyone likes this. Many find them harder to shoot well because of this. Not everyone likes a manual safety either, and of those who like a manual safety, they generally want it to be on the frame under your thumb, not up on the slide where the Beretta has it. They were not especially popular in military service, due in part to being a bit fragile, due in part to some scandals that took place with magazines produced between 2000 and 2010 by a military contract manufacturer called Checkmate Industries. The springs were bad, and the finish on the steel magazine tubes trapped fine Afghan "moon dust" and this, in combination with weak springs, caused severe reliability problems. Checkmate blamed the Pentagon, because the Pentagon specified that particular metal finish in the contract, and the subcontractors who sold them springs that were out of spec, and, well. It left a lot of people very much not in love with the Beretta 92 design. Part of the problem, also, was that during GWOT the US military had constant personnel shortages, and kept lowering standards until large segments of the Army in particular became adult daycare for retards that Burger King wouldn't hire. I heard too many stories of people theoretically trained, who were issued a Beretta 92 from the armory, who then immediately used it as a mallet to drive tent stakes. Anything the military had issued to these people would have had problems. The Beretta 92s, with their aluminum alloy frames, broke a lot when abused this way. Steel framed M1911s would have fared a little better, probably, but they had mostly been pulled from service decades before, and this would not have addressed the training deficits and personnel issues that were the root of the problem.
I have owned both Berettas and Glocks. I can tell you that Glocks are easier to work on. The Beretta 92 is a very elegant design but it is mechanically complex. There is a lot going on inside it. It has lots and lots more moving parts than the Glock does. The Beretta is harder to work on.
Beretta also makes a striker-fired "modern service pistol" called the APX, but I've never owned one. They don't seem to be very popular, though I don't hear anything bad about them. They just came to a market, polymer framed striker-fired full sized service pistols, that Glock has had sewn up for decades, without bringing anything compelling to the table that would make Glock's existing customer base switch.
There are lots and lots of spare parts out there for Glocks and for Beretta 92s. There is an enormous aftermarket for Glocks and a much smaller one for Berettas.
If you have narrowed it to these two choices I think the Glock is probably the better choice because of the relative mechanical simplicity, and because it's easier to do all the little things like replacing the extractor spring.
If not, I encourage you to go to indoor ranges that rent stuff and try things out. Maybe you'll find something you like. I really like the Walther PPQ and PDP and the HK VP9 and USP, for example, though the USP is another double-action-single-action design that has a lot of moving parts. I am very favorably impressed with the Smith & Wesson Military & Police in 9mm and also in .40, though I know the .40 cartridge is not very popular any more and no one wants to hear about it. The Ruger RXM is kind of a Glock clone, except with some patent-able internal differences, and I am encouraged by what I am seeing and hearing about them, though they were only just introduced. The SIG P320 doesn't impress me quite so much. There have been some scandals with them, problems with internal parts breakage and persistent rumors about them being more prone than other designs to firing accidentally if dropped, though tests I've heard of are inconclusive. I've rented one and it ran okay but everything about the experience felt, as the kids say, mid. The trigger in particular was heavy and mushy and did not leave me wanting to do it again.
Anyway. That's a lot of rambling from me in response to a short question. Let me close off the spoiler here. Thanks for listening to me ramble.