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:15:99

And worship your Lord until there comes to you the certainty (death).  

and worship your Lord until Certainty — Death — comes to you. Meccan, except for the last three verses, which are Medinese; it consists of 128 verses, revealed after ˹sūrat˺ al-Kahf.
القرآن:١٥:٩٩

وَاعْبُدْ رَبَّكَ حَتَّىٰ يَأْتِيَكَ الْيَقِينُ  

{واعبد ربك حتى يأتيك اليقين} الموت.