It is tempting to say yes to everyone and everything, but everything you do has an 'opportunity cost' as explained in basic economics. Therefore, there is no way that you can say yes to everything. It is important to set your boundaries at workplace to have a successful career.
1. How to set your boundaries at workplace?
a) Think if you can add any unique value to a situation or a task.
b) Understand the reason behind you spending time on it, is there a compelling reason?
2. Think how much time you can spend on this task if you are to say yes. If it is not taking too much time, maybe you can consider.
3. See if you can get some value out of the request made.
a) Are there synergies in the request to what you already do?
b) Can you gain anything from saying Yes?
4. Is it disturbing your core responsibilities? If yes, that’s when to set the boundary.
a) When saying no, be polite about it, and communicate what the reason behind the 'no' is. And tell them how you can help, without compromising on your own responsibilities.