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:17:29

And do not make your hand ˹as˺ chained to your neck or extend it completely and ˹thereby˺ become blamed and insolvent.  

And do not keep your hand chained to your neck, in other words, do not withhold it completely from expending, nor open it, in order to expend, completely, or you will sit blameworthy — this refers to the first case — and denuded, cut off, having nothing — this refers to the latter case.
القرآن:١٧:٢٩

وَلَا تَجْعَلْ يَدَكَ مَغْلُولَةً إِلَىٰ عُنُقِكَ وَلَا تَبْسُطْهَا كُلَّ الْبَسْطِ فَتَقْعُدَ مَلُومًا مَحْسُورًا  

{ولا تجعل يدك مغلولة إلى عنقك} أي لا تمسكها عن الإنفاق كل المسك {ولا تبسطها} في الإنفاق {كل البسط فتقعد ملوما} راجع للأول {محسورا} منقطعا لا شيء عندك راجع للثاني.