Will Larson has a guiding concept of prioritizing by thinking about what is best for the company, then what is best for your team, and then what is best for your self. However, he caveats this by the fact that he no longer gives this advice because being too dogmatic in this stance can lead to burnout. People need to do energizing work (writing code/cleaning up a wiki/exploratory work/ optimizing systems/etc.) The work just must not create more work for other/future teams1.
1. Larson, W. Company, team, self. (2022).