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:6:61

And He is the subjugator over His servants, and He sends over you guardian-angels until, when death comes to one of you, Our messengers take him, and they do not fail ˹in their duties˺.  

He is the Vanquisher, Superior, over His servants. And He sends guardians over you, angels, to record your deeds, until, when death approaches one of you, Our messengers, the angels charged with the seizing of the spirits, take him (tawaffathu; a variant reading has tawaffāhu) and they neglect not, they do not fall short of what they have been commanded.
القرآن:٦:٦١

وَهُوَ الْقَاهِرُ فَوْقَ عِبَادِهِ ۖ وَيُرْسِلُ عَلَيْكُمْ حَفَظَةً حَتَّىٰ إِذَا جَاءَ أَحَدَكُمُ الْمَوْتُ تَوَفَّتْهُ رُسُلُنَا وَهُمْ لَا يُفَرِّطُونَ  

{وهو القاهر} مستعليا {فوق عباده ويرسل عليكم حفظة} ملائكة تحصي أعمالكم {حتى إذا جاء أحدكم الموت توفَّته} وفي قراءة توفاه {رسلنا} الملائكة الموكلون بقبض الأرواح {وهم لا يفرَّطون} يقصرون فيما يؤمرون به.