For past years I’ve been working as a JavaScript/typescript developer who make websites, I’ve worked as an internee and a full type employee during my education but now I’m unemployed, I see less job openings for MERN, NEXT js developers and at this point I’m unemployed for past 2 months, I’m starting to think that I’ve made a mistake and I should have invested my time leaning pythons, and becoming an AI engineer or data scientist, Is there a way out?
Either learn the hottest new thing or the legacy thing everyone is stuck with, both will always be in demand. But the whole point of the field is to always be learning so starting a good habit of that now is key. Read and research and tinker. Contribute to open source. Follow people and projects on GitHub. The best software engineers are looking for problems to solve and then learning the tools required to solve them, not looking for problems that fit the tools they already know.