Using this mantra whenever someone you regularly see does something offensive or is generally ill mannered can calm your heart from the anger that may arise within you.
Some people genuinely don’t know any better. If they did they wouldn’t behave the way they do.
If you are in a situation where you are living with someone with bad manners that you have to interact with repeatedly or similarly in a work environment with a disagreeable colleague, sometimes the easiest resolution is to repeat to yourself that they don’t know any better.
This protects you from anger, resentment and bitterness. They have not yet reached a level of understanding that precedes respectful treatment of others including you. They are probably hurting more than they are hurting you. Realising this means that you should engage them with humility because if you are obliged to see them regularly you may as well refrain from a negative reaction to their behaviour and make your interactions as pleasant and as cordial as possible.
Compassion is better than anger. Forgiveness is better than resentment. We have a choice.