Here we go a long winded answer to your question. I have 50 years of experience shooting from hunting, combat, competition, and everything in-between. While your question is not a dumb question, it is rather naive. There is no easy answer since the answer can vary. Which one is better? Neither or either.
I love my Glocks but its mainly because they are to the handgun world what a at-15 is to the rifle world.
My favorite are the G19 and the G30 for alternative carry and home defense. My G20/21 also make for some great fun guns and even can double as comp guns.
With that said, as to my Walthers, the only one I really enjoy shooting is my P-38. My PP and PPK only seem to like ball ammo and even they are kind of picky with the brand. The PPQ was horrid compared to the Glock. The PPS was also horrid compared to the Glock. I resold both of them. I guess the P-08s are really fun to shoot also.
Most enjoyable as far as automatics has got to be my 1911s. I have them setup for everything from carry, target to race guns, 9mm, 10mm, 45ACP, 38 super, and 38 wad cutter.
My Smith 52s are literal tack drivers. And I just love my S&W m25 for putting a lot of big lead downrange but the N frame is a lot heavier than the 1911.
I really hate my Beretta 94. Next one to be sold or traded I guess. And the 40 S&W has got to be my less favorite round ever.
For minimal carry I either go with the M&P BG 380 (with trigger and spring mods) to my air weight J frame Smith.
Next step up in carry I got with the G30, Colt Commander, Smith m10 2" or m19 2.5".
And ridiculous carry would have to be the G20/21, GC 1911, S&W 19 with 4" barrel.
Notice I never carry a 9mm. The 38 special and 380 have come a long way as defensive carry rounds and the 45acp is worth loosing a couple rounds for. The biggest issue I think with 9mm is having to use hearing protection always. Out in the real world anything supersonic will hurt you without protection and I'm never gonna ask someone to kindly stop shooting while I put in ear plugs.
I love my K frame wheel guns. Very versatile and what I normally recommend for 1st time shooters. For 1st time carry guns I recommend the J frame smith. (Although the Colt is also nice and has 6 shots.) Wheel guns are great for weak handed or inexperienced people. Thumb the hammer back and you got one light trigger that's accurate as hell. For first time carry autos I usually recommend the g43 or g19 even though I don't carry a 9mm myself. I usually mod all Glocks with just under a 4lb trigger and extended take down and mag releases. For that matter, I believe everything I have modified everything to between 3.5 and 4 lbs trigger. But that's just personal preference. My go to house gun is either the G21 with 13 or 30 round mag or GC 1911 both with a laser and flashlight combo.
SHTF, I'm grabbing my G30 and AR-15 with as much ammo as I can carry. If I'm going to a match, it all depends on what kind of match it is. I'd look pretty silly showing up at a combat style match with my 12" scoped magnum. Likewise I'd be pretty silly to think I can hit a target at 100 yards with my mouse gun.
I can't even guess at how many guns I've bought and sold, liked and disliked. What I said previously, the gun has to suit your use and experience level. I question anyone that claims one is better than another without considering the use and the person. Last person I trained for self defense was a 85 year old minister, we settled on a J frame air weight with wad cutters or low recoil Hornady hollow points. He can't shoot double action but he had enough hand strength to pull back the hammer and control the low recoil. Most versatile ammo ever is the 38 special. You can go from low recoil to +P with the same gun. I prefer big stupid bullets but controlling recoil and the weapon trumps the caliper. Wheels guns with speed loaders can be faster than a automatic putting the same amount of lead downrange.
Before buying any gun I recommend you buy "Principals of Self Defense" by Jeff Cooper. It was written almost 50 years ago but the concepts of self defense haven't changed, just the weapons have.
"Owning a handgun doesn't make you armed any more than owning a guitar makes you a musician."
If you want to add more about how experienced you are and your usage then maybe it becomes easier to recommend a particular gun. You can't make a value decision based on no information. While I think the Glock is the most reliable and rugged on the market unless you are skilled in the finer points of handling that gun it may not be the best choice. No hammer, no external safety, no easy loaded indicator, lack of slide seriations, etc. Not exactly what I'd recommend for a first time shooter. And the lack of those safety features are not a problem for experienced shooters or for those that have been properly trained. On the other hand, my Glocks are abused, never cleaned, and have never failed to go bang.
If I could only have one gun, its gonna be the Glock 30. Hope that answers your question.