If you look around the world, you will realize that the design of nature is so perfect. Everything functions meticulously in your favour and yet, you complain when you lack minor things. This craving for what you do not have is ingratitude.
Think about the number of years you have been arrogating various provisions. If you were to pay for these provisions, it would add upto several digits. The law of gravity is maintained perfectly. The Ozone layer in the ionosphere is designed to prevent ultraviolet rays. Oxygen is heavier than all other gases so it remains on the ground for us to breathe, and all other poisonous gases rise into the atmosphere. Who is responsible for this? There seems to be an unseen benefactor. You need to be grateful to the unseen provider!
Further, imagine if you were to set up a family on the moon, do you realize the number of things you would have to take care of like water, the atmospheric condition, and millions of other designs of nature?
We take many things for granted because they are already taken care of, and yet, we are ungrateful for all the provisions.
If you examine your life within you, you find so many things that can go wrong, but they are maintained ingeniously. Therefore, when your mind desires something that you do not have, count the blessings and focus on those things that you already have.
You have to be aware of your provisions and your provider. Thereafter, you develop an attitude of gratitude. Devotion to GOD is essence in this attitude of gratitude. Marcus Aurelius recommended the technique to Think of what you have rather than what you lack. Of the things you have, select the best and then reflect how eagerly you would have sought them, if you did not have them