Right for the wrong reason.
Are 30y loans bad? Yes.
Is it still ok to buy a home with a 30y loan? Yes.
However, as your career (hopefully) grows and you earn more, plus inflationary aspects of time, eventually you want to be in a spot to refinance your 30y loan into a 15y or 20y one (and hopefully before the half way point!).
I was able to refi a 30y loan about six years into it into a 15y thanks to low Covid rates, and while I only pay a few hundred more per month I went from maybe $6,000 a year in principal and $8,000 in interest to $14,000 a year in principal and $5,000 a year in interest. “Throwing away” a lot less money in interest payments is good for your net worth.