There are only three verses, but they strongly convey the sense of a peace of mind that passeth all understanding.
They may be David’s confession as a young man, before he became king, and was then subject to the intrigues and politics of the court. Saul and his henchmen were jealous of him, but David disdains any false motives and ambitions. Many, particularly those who are beginners in the ways of the world, think that their intelligence, their recognisable talents, or their force of character are the credentials that are essential to be upwardly mobile. Lofty thoughts, haughty intentions that begin to dabble precipitately in high affairs.
David shunned that, and was content in whatsoever condition he was. A child, when breast-fed, is always impatient and demanding. But when weaned from his mother and not dependent on what she gives, becomes calm and self-contained. David encourages us to be so. Our dependence is to be on God alone, and not on His gifts. We love Him for who He is, and not for what He can give.