The Messenger of Allah ﷺ said, "Those who have the most will be the lowest on the Day of Resurrection, except for the one who gives like this, and like this, and like this."
حدثنا يونس حدثنا ليث عن محمد عن أبيه وغيره
عن رسول الله ﷺ قال الأكثرون الأسفلون يوم القيامة إلا من قال هكذا وهكذا
This has already been mentioned in similar form, with the wording, "Those who accumulate wealth are ruined, except one who does like this and like this..." number 8071.