This is excellent advice which has even been echoed by Warren Buffet [0]. Time is a finite resource and therefore everything we do is a trade-off between depth and breadth. In a given day, you could spend 1 hour learning 24 subjects, or 24 hours learning 1 subject. One isn't necessarily better than the other, but it's a constraint we all operate around. Learning 24 subjects may be interesting and fulfilling to some, but from a professional standpoint those that tend to be most influential in their respective fields are those that devote the most time towards their subjects. There are exceptions of course, but this is the general advice for the general population.
Recently, I've started to adopt a similar perspective by rigorously evaluating everything with a simple question: "20 years from now, will my kids be proud that I did this?" If the answer is no, I stop it. So far, I've stopped playing video games and using social media, and I've noticed that I've gotten an extra 10-15 hours per week to spend on things that will make me a better person in the long term, like reading, working out, and spending time with my friends and family.
The same approach could be used with any endeavor: "In X years, will I be better at <subject> if I continue to do Y?"
[0] https://jamesclear.com/buffett-focus