In the tech world, progress happens so fast that even as a programmer it is hard to keep up. You will often hear that before you complete all the exercises in the programming book you bought, the language may become obsolete. But that is a myth. I learned my very first programming language over 20 years ago and it is still relevant today.
If the speed of development was as fast as it is claimed, then programming would be highly inefficient. Just like fashion, there are fads that come and go, but we still have to wear pants. The C language which was first standardized more than 30 years ago, and it is still used extensively. Java, which is also very old, powers the millions of apps in the android ecosystem and then some.
Most languages used today have their roots with something a few decades old. And when they become obsolete, your experience doesn't become irrelevant.
By extensively programming in any particular language, you don't just become an expert in said language. You become an expert at problem solving. The more experienced developers have no problem switching from language to language with minimal friction.