Figure Out What Doesn't Matter
The best way to get useful stuff done is to not do other things. Particularly other things that aren't useful.
'No' is an important word for anyone trying to accomplish anything. At work (and in many other parts of life) there will be no end to the things you're asked to do. The only way to really move important things forward is to determine what isn't important and deprioritize it (note: "deprioritize" is typically just a nice way of saying "Nope, I'm not going to do that").
How do you figure out what matters and what doesn't? Look at what the goals are. If you're working on a really tight deadline, maybe now is not the time to introduce a linter to your large, aging codebase (even if linting is a good idea!).
In general, make sure you understand what your organization values and what you value. If you're working hard on a task that doesn't align with either of those things, think hard about whether or not it's the best use of your time right now.