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:47:27

Then how ˹will it be˺ when the angels take them in death, striking their faces and their backs?  

Then how will it be, their predicament, when the angels take them away, beating (yadribūna is a circumstantial qualifier referring to the angels) their faces and their backs?, with hooked iron rods.
القرآن:٤٧:٢٧

فَكَيْفَ إِذَا تَوَفَّتْهُمُ الْمَلَائِكَةُ يَضْرِبُونَ وُجُوهَهُمْ وَأَدْبَارَهُمْ  

{فكيف} حالهم {إذا توفتهم الملائكة يضربون} حال من الملائكة {وجوههم وأدبارهم} ظهورهم بمقامع من حديد.

See similar narrations below:

Collected by Qurʾān
quran:8:50

And if you could but see when the angels take the souls of those who disbelieved... They are striking their faces and their backs and ˹saying˺, "Taste the punishment of the Burning Fire.  

And if you could only see, O Muhammad (s), when the angels take (read either as yatawaffā or tatawaffā) the disbelievers, beating (yadribūna is a circumstantial qualifier) their faces and their backs, with hooked iron rods, and, they say to them: ‘Taste the chastisement of burning, that is, the Fire (the response to the ˹clause beginning with˺ law, ‘if’, would be la-ra’ayta amran ‘azīman, ‘you would truly have seen an terrible sight’).
القرآن:٨:٥٠

وَلَوْ تَرَىٰ إِذْ يَتَوَفَّى الَّذِينَ كَفَرُوا ۙ الْمَلَائِكَةُ يَضْرِبُونَ وُجُوهَهُمْ وَأَدْبَارَهُمْ وَذُوقُوا عَذَابَ الْحَرِيقِ  

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