Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:19

Have you made the providing of water for the pilgrim and the maintenance of al-Masjid al-Haram equal to ˹the deeds of˺ one who believes in Allah and the Last Day and strives in the cause of Allah? They are not equal in the sight of Allah. And Allah does not guide the wrongdoing people.  

Do you reckon the giving of water to pilgrims and the attendance of the Sacred Mosque, that is, ˹do you reckon˺ those who do such things, to be the same as he who believes in God and the Last Day and struggles in the way of God? They are not equal, in merit, in God’s sight; and God guides not the evildoing, the disbelieving, folk: this was revealed to refute those who claimed this, such as al-‘Abbās and others.
القرآن:٩:١٩

أَجَعَلْتُمْ سِقَايَةَ الْحَاجِّ وَعِمَارَةَ الْمَسْجِدِ الْحَرَامِ كَمَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَجَاهَدَ فِي سَبِيلِ اللَّهِ ۚ لَا يَسْتَوُونَ عِنْدَ اللَّهِ ۗ وَاللَّهُ لَا يَهْدِي الْقَوْمَ الظَّالِمِينَ  

{أجعلتم سقاية الحاج وعمارة المسجد الحرام} أي أهل ذلك {كمن آمن بالله واليوم الآخر وجاهد في سبيل الله لا يستوون عند الله} في الفضل {والله لا يهدي القوم الظالمين} الكافرين، نزلت ردا على من قال ذلك وهو العباس أو غيره.

See similar narrations below:

Collected by Ibn Ḥibbān

ذِكْرُ الْخَبَرِ الدَّالِّ عَلَى أَنَّ جِهَادَ الْفَرْضِ وَالنَّفَقَةِ فِيهِ أَفْضَلُ مِنَ الطَّاعَاتِ الْأُخَرِ، وَإِنْ كَانَ فِي بَعْضِهَا فَرْضٌ

ibnhibban:4591Muḥammad b. ʿAbdullāh b. ʿAbd al-Salām Bibayrūt > Muḥammad b. Khalaf al-Dārī > Maʿmar b. Yaʿmar > Muʿāwiyah b. Sallām > Zayd b. Sallām > Abū Sallām > al-Nuʿmān b. Bashīr

[Machine] I was at the pulpit of the Messenger of Allah ﷺ when a man said, "I don't mind doing any deed after embracing Islam except for rebuilding the Masjid al-Haram." Another person said, "The last Jihad in the cause of Allah is better than what you said." So Allah revealed, "Do you make the providing of drinking water to the pilgrims and the maintenance of al-Masjid al-Haram equal to someone who believes in Allah and the Last Day and strives in the cause of Allah? They are not equal in the sight of Allah. And Allah does not guide the wrongdoing people."  

ابن حبّان:٤٥٩١أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ عَبْدِ السَّلَامِ بِبَيْرُوتَ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ خَلَفٍ الدَّارِيُّ قَالَ حَدَّثَنَا مَعْمَرُ بْنُ يَعْمَرٍ قَالَ حَدَّثَنَا مُعَاوِيَةُ بْنُ سَلَّامٍ قَالَ حَدَّثَنَا زَيْدُ بْنُ سَلَّامٍ أَنَّهُ سَمِعَ أَبَا سَلَّامٍ قَالَ حَدَّثَنِي النُّعْمَانُ بْنُ بَشِيرٍ قَالَ

كُنْتُ عِنْدَ مِنْبَرِ رَسُولِ اللَّهِ ﷺ فَقَالَ رَجُلٌ مَا أُبَالِي أَنْ أَعْمَلَ عَمَلًا بَعْدَ الْإِسْلَامِ إِلَّا أَعْمُرُ الْمَسْجِدَ الْحَرَامَ وَقَالَ آخَرُ الْجِهَادُ فِي سَبِيلِ اللَّهِ أَفْضَلُ مِمَّا قُلْتُمْ فَأَنْزَلَ اللَّهُ «{أَجَعَلْتُمْ سِقَايَةَ الْحَاجِّ وَعِمَارَةَ الْمَسْجِدِ الْحَرَامِ كَمَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَجَاهَدَ فِي سَبِيلِ اللَّهِ لَا يَسْتَوونَ عِنْدَ اللَّهِ وَاللَّهُ لَا يَهْدِي الْقَوْمَ الظَّالِمِينَ} » *