It is reported that Al-Ḥasan Al-Baṣrī often used to say, “O youth! Seek the hereafter, for we often see people pursuing the hereafter and finding it as well as the dunyā (worldly wellbeing), but we have never seen anyone pursue the dunyā and gain the hereafter as well as the dunyā.”
Al-Bayhaqī, Al-Zuhd Al-Kabīr, article 12.