One size doesn't fit all.
Obviously how long you plan to stay is a factor. But I think age is an even bigger factor. I bought my forever home in my early 20s. Our combined income was roughly what 2 people making minimum wage at full time jobs would earn, and we borrowed 3x our income. A 30 year mortgage made a nice modest home affordable to us. A 15 year would have put almost any place out of reach for a decade.. Making the normal payments for 10 years and then accelerating for the next 5 when our incomes were significantly different was the key. In retrospect, the important thing was getting in the door at a reasonable price for us to spend on a home, not worrying about duration of the mortgage. ...because we were so young. At 35, with the first place paid off, we bought the income properties, but never traded up on the roof over our heads. I feel pretty strongly about either owning your home outright before retirement or having passive income cover living expenses before you leave the workforce.
For those who waited until their 30s and 40s to settle down and buy a home, they probably should consider only buying what is affordable on a 15 year mortgage. I know plenty who face several thousand dollar monthly mortgage payments through age 70 and beyond and the idea of it exhausts me.