Once you reach your mid- to late-30s, you'll find your ability to spend time learning decreasing due to aging and increased personal and family time commitments. You also find that, much like compound interest, the more you know, the easier it is to learn more because of how interrelated computing topics are. So, yes, it's worth investing as much time as you can afford on learning while still in your twenties will pay off very well.
There are caveats, of course:
- "Afford" is rather an important word in the last sentence above; burnout and stunting your personal relationships are genuine hazards.
- Choose carefully learn because of the "half-life of knowledge" (https://en.wikipedia.org/wiki/Half-life_of_knowledge). You will want to concentrate on fundamental topics that hold their value over the long term, like security, performance analysis, etc. rather than ephemeral knowledge like tools, frameworks, and libraries.