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:4:39

And what ˹harm would come˺ upon them if they believed in Allah and the Last Day and spent out of what Allah provided for them? And Allah is ever, about them, Knowing.  

And what burden is on them if they were to believe in God and the Last Day, and expend of what God has provided them?, that is to say, what harm would this cause them? In other words, there is no harm therein. Rather, harm lies in what they follow (the interrogative is meant as a disavowal; the law ˹of law āmanū, ‘if they were to believe’˺ conveys the sense of the verbal noun ˹sc. mādhā ‘alayhim īmānuhum, ‘what burden would their belief be upon them?’˺). God is ever Aware of them, and will requite them for what they have done.
القرآن:٤:٣٩

وَمَاذَا عَلَيْهِمْ لَوْ آمَنُوا بِاللَّهِ وَالْيَوْمِ الْآخِرِ وَأَنْفَقُوا مِمَّا رَزَقَهُمُ اللَّهُ ۚ وَكَانَ اللَّهُ بِهِمْ عَلِيمًا  

{وماذا عليهم لو آمنوا بالله واليوم الآخر وأنفقوا مما رزقهم الله} أي أيّ ضرر عليهم في ذلك والاستفهام للإنكار ولو مصدرية أي لا ضرر فيه وإنما الضرر فيما هم عليه {وكان الله بهم عليما} فيجازيهم بما عملوا.