Short answer: use your expertise in complex project.
Story: I'm dev for about 20 years. First time I had totally the same felling when desktop ui fading away in favor of html. I missed beauty of c# winforms controls with all their alignment and properties. My experience felt irrelevant anymore. Asp.net (framework which were sold as "web for backed developers") looked like evil joke.
Next time it have happened with the raise of clouds. So were all my lovely crafted bash scripts and notes about unix command irrelevant? This time however that was not that personal for me.
Next time - fall of scala as a primary language in big data and its replacement with python. This time it was pretty routine.
Oh and data bases... how many times I heard that rdbms is obsolete and everybody should use mongo/redis/clickhouse?
So learn new things and carry on. Understanding how "obsolete" things works helps a lot to avoid silly mistake especially in situation when world literally reinvent bicycle