Start with a good online free course like https://www.coursera.org/specializations/machine-learning-in...
You don't have to be a full-bore data scientist to benefit from the surging interest in ML -- for example, I've made my current focus 'UX for data scientists', I focus on trying to make interfaces that are pleasing to people working in ML, and this, I am pleased to say, just got my ass hired.
It's also salient to know that, over the next decade, while tech salaries will likely trend down (esp. as CoPilot, nocode/lowcode, etc continue to make our lives easier and hence less lucrative ;D) the *amount of addressable work* in ML specifically will almost certainly offset this change.
YMMV in other tech specializations, but I'd still rather be in our industry than most others. Again, there's plenty of work in MLOps that does not require being a data scientist.
Finally, if you can physically live in a geolocation with lower cost of living (or better yet, a currency that is weaker than USD) you can be the lower-cost option that everyone ditches Fancy McSanFransiscoPants for in 2023. Be sure to blog and show your work on GH ;D