In every interaction, you teach others how to treat you with your actions and words – or lack thereof. It’s okay to have boundaries and it’s okay to assert them. Those who matter will care and respect them. Those who don’t care or respect them don’t matter anyways.
The point is that you are accountable, and that it is you who teaches others what’s acceptable.