I'm assuming you are either military or prior. I hear this a lot from my military friends as the M9 is a familiar design and Glock is just a household name in handguns.
I would take neither as my personal experience with the M9 was less than stellar however you can take that with a grain of salt since all of those were heavily used and poorly maintained(like a lot of other things in the military). Glock used to be the gold standard in polymer framed striker fired handguns but in recent years they have been slipping, serious malfunctions with their generation 4 models culminated with a recall last fall that to my knowledge is still ongoing. right now a major complaint, although not a huge deal is erratic ejection patterns with the spent brass, they seem to spit it everywhere including back into the shooters face.
I agree that there are a number of things that we need to hear from you such as
budget? are you looking to spend $400 or $2,000? this can help us narrow down the playing field for you
what do you plan on using it for? target practice 3 times a year and never leaves the gun safe or are you looking at concealed carry? hunting? police duty?
are you dead set on 9mm or are you looking to branch out to other calibers?
do you need a gun that you can learn the basics with or are you proficient with handguns and just want a new one for the collection?
this information would help the rest of us quite a bit.
ignore my complete lack of capitalization. I still have no problem correcting your grammar.
I never said half the stuff people said I did-Albert Einstein
You can't believe everything you read on the internet-Benjamin Franklin