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:22:1In the name of Allah, the Entirely Merciful, the Especially Merciful.

O mankind, fear your Lord. Indeed, the convulsion of the ˹final˺ Hour is a terrible thing.  

O mankind, that is, the inhabitants of Mecca and others: fear your Lord, that is, of His punishment, by being obedient to Him. Surely the earthquake of the Hour ˹of Doom˺, that is, the violent quaking of the earth after which the sun will rise from the west, ˹something˺ which will be near ˹the time of˺ the Hour, is a tremendous thing, in the way it will distress people — this itself being a sort of punishment.
القرآن:٢٢:١بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ

يَا أَيُّهَا النَّاسُ اتَّقُوا رَبَّكُمْ ۚ إِنَّ زَلْزَلَةَ السَّاعَةِ شَيْءٌ عَظِيمٌ  

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