He came upon the Prophet ﷺ while he was reciting "Competition for worldly gain distracts you" [Takathur 102:1]. The Prophet ﷺ said, "The son of Adam says, 'My wealth, my wealth!' But do you truly own anything of your wealth except what you gave in charity and so sent forward, or what you ate and so consumed, or what you wore and so wore out?"
حدثنا محمود بن غيلان حدثنا وهب بن جرير حدثنا شعبة عن قتادة
أنه انتهى إلى النبي ﷺ وهو يقرأ {ألهاكم التكاثر} قال يقول ابن آدم مالي مالي وهل لك من مالك إلا ما تصدقت فأمضيت أو أكلت فأفنيت أو لبست فأبليت
Muslim also narrated it in the Book of Asceticism and Softening of Hearts, chapter "The world is a prison for the believer and a paradise for the disbeliever," hadith no. 2958, from the hadith of Shubah, with the same wording.