The Messenger of Allah ﷺ said, "Whoever makes the Hereafter his main concern, Allah places contentment in his heart, gathers his affairs together for him, and the world comes to him reluctantly. But whoever makes the world his main concern, Allah places poverty before his eyes, scatters his affairs, and nothing of the world comes to him except what has been decreed for him."
حدثنا هناد حدثنا وكيع عن الربيع بن صبيح عن يزيد بن أبان وهو الرقاشي
قال رسول الله ﷺ من كانت الآخرة همه جعل الله غناه في قلبه وجمع له شمله وأتته الدنيا وهي راغمة ومن كانت الدنيا همه جعل الله فقره بين عينيه وفرق عليه شمله ولم يأته من الدنيا إلا ما قدر له
[Its chain of transmission is daif] Baghawi also narrated it in Sharh al-Sunnah, no. 4142, from the hadith of Rabi bin Sabih, with this same wording. Yazid bin Aban is well known to be daif, and the hadith has daif corroborating narrations.