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:34:51

And if you could see when they are terrified but there is no escape, and they will be seized from a place nearby.  

If you could but see, O Muhammad (s), when they are stricken with terror, at the Resurrection, you would see a dreadful thing, and so there is no escape, for them, from Us, that is to say, they will not ˹be able to˺ elude Us, and they are seized from a close quarter, namely, ˹from˺ the graves.
القرآن:٣٤:٥١

وَلَوْ تَرَىٰ إِذْ فَزِعُوا فَلَا فَوْتَ وَأُخِذُوا مِنْ مَكَانٍ قَرِيبٍ  

{ولوْ ترى} يا محمد {إذْ فزعوا} عند البعث لرأيت أمرا عظيما {فلا فوت} لهم منا، أي لا يفوتوننا {وأخذوا من مكان قريب} أي القبور.