Narrated Abu Huraira: Allah's Messenger ﷺ said, "Not to wish to be the like except of two men. A man whom Allah has given the (knowledge of the) Qur'an and he recites it during the hours of night and day and the one who wishes says: If I were given the same as this (man) has been given, I would do what he does, and a man whom Allah has given wealth and he spends it in the just and right way, in which case the one who wishes says, 'If I were given the same as he has been given, I would do what he does'. "
The Prophet Muhammad ﷺ was teaching us that we should use our blessings from Allah wisely instead of wishing for something that we do not have or cannot control. He was also teaching us that if we are fortunate enough to receive any kind of blessing from Allah then we must use it responsibly so as not to waste it or misuse it. By doing this, we can become closer to Allah and gain His pleasure through our actions.