The Messenger of Allah ﷺ said, "Every form of spending is in the cause of Allah except spending on building, for there is no good in it."
حدثنا محمد بن حميد الرازي حدثنا زافر بن سليمان عن إسرائيل عن شبيب بن بشير هكذا قال شبيب بن بشير وإنما هو شبيب بن بشر
قال رسول الله ﷺ النفقة كلها في سبيل الله إلا البناء فلا خير فيه
[Its isnad is daif] Ibn Adi narrated it, 10873, from the hadith of Zafir bin Sulayman with the same chain. He is truthful but weak in hadith, the majority declared him daif due to his numerous errors, as I have established in the commentary on Tahdhib al-Tahdhib.