know which side the bread is buttered (on)
(to know how to treat someone in order to get what you want)
- I know which side my bread is buttered on, so I always try to please our customers.
- John is rude to his father. He doesn’t know which side of his bread is buttered.