I personally bought a house in my early twenties. At the time it was roughly 2.5x my income. I've been there a few years and went through some changes to my employment, I now earn more making it easier. Over the course of ownership, in the ~20 years, I'll have paid close to $400k between the principal and interest.
If I made more, it wouldn't change the amount I pay toward my house so it wouldn't make me own the house faster. While I could send additional payments, the amount of interest I'd avoid would not be worth it.
If I had $20k available to me right now and sent it entirely to my house it'd save around $12k in interest over 15 years. Had I invested that $20k now and received only a 5% growth, over 15 years that would have earned $22k in compound earnings leaving me with $42k of potentially easily liquidatable assets.
Buying a house that is close to your annual income doesn't make you own the house faster, it just makes it easier for you to afford.
I think the guidance most people should take away is to avoid buying a house that you cannot pay off in 10-15 years. A house at $250k at a 3.5% interest rate would cost you $72k in interest on a 15-year mortgage or $154k in interest on a 30-year mortgage. At that point, it is worth sending additional payments (especially early on in the mortgage) to save on interest. This is pretty popular advice, to not overshoot for a house you cannot afford. The best reason is that you can still move later on. Buying a house you'll live in the rest of your life might be a good goal (@Clubber) but it doesn't happen for most of us. Instead, buy a house you can actually make a dent toward ownership in, so if you want to sell it in 10-15 years you'll do so with potential profit.
You don't need to sell your house for a profit (although we all would love to). Had you rented like @magic_beans wants you to, you might have lost 100% of that money and every year your rental price may go up, you might not be allowed to have pets, you can't make improvements you want; you can lose a lot of control with renting. If you buy an affordable house though, in 10 years you might sell it and if you get back even 50% of the total cost of ownership you still walk away better than someone who rented. If you got a house you could pay off in 10 years, you might walk away with a lot of cash and some profit (especially if the house's value went up).
You then have the choice to use the cash from your home sale as a down payment for your next house, which would allow you to afford a slightly more expensive house while still paying it off in 10 years. Imagine you buy a house now for $250k, pay it off 15 years (that might cost you around $2.5k/month). You sell it in 10 years, you could then buy a house for $500k and only mortgage another $250k. Or you could buy a reasonably priced home in the middle, allowing you to start investing your money elsewhere, pay off the house sooner, etc.
My plan, my suggestion: Buy a house when you're in your 20s that is affordable. By the time you're married, have kids that need their own rooms, and are looking to settle down a bit more you'll be able to sell that first house and afford that house you need. It's worked out so far.