Rub it in
It means to emphasize someone's failure or embarrassment, often cruelly, or to boast about your own success to someone else's disadvantage (add insult to injury). To keep bringing up a mistake, failure, or something embarrassing that someone already feels bad about, or to gloat.
It's used to tell someone to stop dwelling on something negative or to stop bragging. While sometimes it might be intended as friendly teasing, in most contexts, it is considered mean, insensitive, and deliberately hurtful behavior in situations like:
boasts excessively about an achievement or stroke of luck in front of someone who wanted the same thing but failed to get it; keeps bringing up a mistake or failure that a person would rather forget, often to humiliate them; emphasizes their superiority in a way that is insensitive to the other person's feelings, like adding "salt to a wound".
E.g. (Negative): "I know I messed up the presentation, but don't rub it in".
E.g. (Bragging): "Not to rub it in, but I got the promotion you wanted".