There are times when avoiding is healthy and a boundary within itself. If someone is intentionally staying and doing things to hurt you, be it physically or emotionally. Then by all means, avoiding them or removing them from your experience is a very common self protection measure. Harmful hurtful people are better removed. There are times you cannot remove someone from your world that has these behaivors. In that case, keep at a distance those who cannot and do not apologize sincerely and take accountability for their actions. With mostsituations bot involving your or your family and friends' safet there can be a confident action as simple as a quick short to-the-point communication to reiterate a necessary boundary, or to establish the level of intimacy may or may not be comfortable with at that time. You teach others how to treat you.
Pretty soon, you will find there are less and less dangerous people in your world and truly enjoy expressing yourself authentically. Communication is an art.