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:47:38

Here you are - those invited to spend in the cause of Allah - but among you are those who withhold ˹out of greed˺. And whoever withholds only withholds ˹benefit˺ from himself; and Allah is the Free of need, while you are the needy. And if you turn away, He will replace you with another people; then they will not be the likes of you.  

Lo! there you are, O, those who are being called to expend in the way of God, that which has been prescribed for you; yet among you there are those who are niggardly; and whoever is niggardly is niggardly only to his own soul (one may say bakhila ‘alayhi or ˹bakhila˺ ‘anhu ˹to mean, ‘he was niggardly to someone’˺). For God is the Independent One, ˹without need˺ of your expending; while you are the needy, of Him. And if you turn away, from obedience to Him, He will replace you with another people, that is to say, He will bring them in your place, and they will not be the likes of you, in turning away from obedience to Him, but ˹they will be˺ obedient to Him, Mighty and Majestic ˹is He˺. Medinese: it was revealed on the return from al-Hudaybiyya; it consists of 29 verses.
القرآن:٤٧:٣٨

هَا أَنْتُمْ هَٰؤُلَاءِ تُدْعَوْنَ لِتُنْفِقُوا فِي سَبِيلِ اللَّهِ فَمِنْكُمْ مَنْ يَبْخَلُ ۖ وَمَنْ يَبْخَلْ فَإِنَّمَا يَبْخَلُ عَنْ نَفْسِهِ ۚ وَاللَّهُ الْغَنِيُّ وَأَنْتُمُ الْفُقَرَاءُ ۚ وَإِنْ تَتَوَلَّوْا يَسْتَبْدِلْ قَوْمًا غَيْرَكُمْ ثُمَّ لَا يَكُونُوا أَمْثَالَكُمْ  

{ها أنتم} يا {هؤلاء تدعون لتنفقوا في سبيل الله} ما فرض عليكم {فمنكم من يبخل ومن يبخلْ فإنما يبخل عن نفسه} يقال بخل عليه وعنه {والله الغني} عن نفقتكم {وأنتم الفقراء} إليه {وإن تتولوا} عن طاعته {يستبدل قوما غيركم} أي يجعلهم بدلكم {ثم لا يكونوا أمثالكم} في التولي عن طاعته بل مطيعين له ﷻ.