Hold one’s tongue

Meaning: To remain silent instead of saying something you want to say.

Example: I wanted to complain, but I decided to hold my tongue.