Build self-awareness
The first step to changing any behavior is to identify it.
As such you need to cultivate self-awareness. You can do this by journaling, seeing a therapist, or meditating. Reflection is a necessary component to building self-awareness. Building a habit of reflection will help you become more and more cognizant of your actions as you’re doing them.
So step 1 is to start building a practice of self-awareness, of knowing what you’re doing and why.
For example, when you say “yes,” is it because you’re feeling pressured? Do you feel obligated even though you know there isn’t actually any concrete obligation in place?
Examine how you feel during these exchanges. You can also ask yourself how you would feel if you said “no.” This can be enlightening and help you identify your feelings.