I think this depends on a person's life circumstances. If they have a large family that requires a lot of space in a high cost of living area, then the home may be warranted (and simultaneously act as an investment / long-term asset).
However, since homes come with consistent expenses, I generally would prefer to have more invested in an investment portfolio. It's generally riskier but better for long-term growth.
If you look at real estate growth in the short term (i.e. the past decade), it actually served as a great investment. However, so did stocks!
Ideally, there should be a balance between both, rather than choosing between them.
Balance really is key—diversification can help mitigate risk while tapping into different growth opportunities, especially in volatile markets