If you're a programmer, focus on the fundamentals: Learn to write new code and maintain legacy code. Learn to write tests. Learn API design. Learn how to estimate projects. Learn to differentiate between a risky code change and one that isn't risky. Learn to refactor something without changing its functionality. Read/know the literature. Don't get hung up on any particular language, framework or technology.
Actually, be wary with this sort of "specialization" because if the market shrinks or stops growing, you'll end up isolated from the work force.
I'm at a client site that is still rolling things from their MAINFRAMES into web apps. I know some old LISP programmers that are freaking out that major systems will die because the youngest person on the team is pushing 60 with no code or programmer replacement in site.
There's always a long tail, and always something new coming out.
1997: Is my career doomed if I don't become a web developer? No.
2007: Is my career doomed if I don't become a mobile developer? No.
2017: Is my career doomed if I don't become an AI/ML developer? No.
2027: Is my career doomed if I don't become a/an [...]? No.