This is just how it is, and has always been in this industry. And it takes about 10 years to realize it.
When I started my career in software, businesses were still writing new code in COBOL. 10 years later those skills were pretty much useless, except for dwindling maintenance roles.
Then there was the client/server era. Then the web era. Then mobile. Then cloud, etc.
All the same functionality, written and re-written time and time again, using the latest popular stacks and methodologies.
I hope to be retiring in a few years and pretty much everything I have learned over nearly 40 years is no longer applicable or is at best losing relevancy to the way sofware is built today. And that's how it's always been.