Sayyiduna Yazid bin Akhnas (may Allah be pleased with him) reports that the Noble Prophet (peace and blessings be upon him) said: "Do not try to surpass one another except in two things. One is the person to whom Allah has given the Qur'an, so he stands with it (in prayer) by night and day, and follows what is in it. So someone may say: If Allah were to grant me as He has granted him, I would act upon it as he does. And the other is the person to whom Allah has given wealth, so he spends it and gives charity from it. So someone may say: If only Allah would grant me (wealth), I would do as he does."
Related hadith on this topic