Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:23:74

But indeed, those who do not believe in the Hereafter are deviating from the path.  

And truly those who do not believe in the Hereafter, in resurrection, reward and punishment, deviate, swerve away, from the path, that is, the route ˹to salvation˺.
القرآن:٢٣:٧٤

وَإِنَّ الَّذِينَ لَا يُؤْمِنُونَ بِالْآخِرَةِ عَنِ الصِّرَاطِ لَنَاكِبُونَ  

{وإن الذين لا يؤمنون بالآخرة} بالبعث والثواب والعقاب {عن الصراط} أي الطريق {لناكبون} عادلون.