I'm pushing 40, graduated high school in 2000. I heard a lot of the same "wisdom." For some reason I just really wanted to be a software developer so I stuck with it even though the dot com bubble was in full catastrophe mode. I'm glad I did, but I can't claim magic wisdom. I don't know how kids are supposed to get good life/career advice. I surely didn't.
Perhaps the only thing I can reasonably suggest is that people create a "skill stack" instead of a skill. I'm a good coder, but coding is probably among my least economically valuable skills. My most valuable skill, by far, is communication. I can explain technical things to non-technical people and do so in a way that doesn't make them feel dumb. Part of the key there is I know they're not dumb. That wins you a lot of favors. My second most valuable skill is having a basic understanding of economics/business, how incentives work, how business decisions are made, etc. This helps me anticipate the needs of others at work and help solve their real problems which they may not even see clearly themselves.
If the stats offer any credibility... I work from home full time and have for nearly a decade. I've got 2 concurrent contracts going on right now. I'm expecting to make >$300k this year. I live in a 2nd tier city with a low cost of living, you've heard of it but it's not NY/LA/etc. I've never even applied to a FAANG type place.