Gratitude

Contentment is the antidote to complaining. (Many sources)

Another has said that the antidote (to complaining) is being grateful. In any case, no one likes to be around people who are disagreeable, constantly critical of others, and dissatisfied with their circumstances. To counter such unpleasant behavior, don’t waste time using logic. Demonstrate your own gratitude for life and contentment with what God has given you.

The fear of the Lord leads to life; then one rests content (Proverbs 19:23).