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:8:25

And fear a trial which will not strike those who have wronged among you exclusively, and know that Allah is severe in penalty.  

And be afraid of a trial which, if it were to fall upon you, would certainly not fall exclusively upon the evildoers among you, but would encompass them and others, and the way to guard against it is to repudiate that evil which necessarily results in ˹precipitating˺ it; and know that God is severe in retribution, against those who oppose Him.
القرآن:٨:٢٥

وَاتَّقُوا فِتْنَةً لَا تُصِيبَنَّ الَّذِينَ ظَلَمُوا مِنْكُمْ خَاصَّةً ۖ وَاعْلَمُوا أَنَّ اللَّهَ شَدِيدُ الْعِقَابِ  

{واتقوا فتنة} إن أصابتكم {لا تصيبنَّ الذين ظلموا منكم خاصة} بل تعمهم وغيرهم واتقاؤها بإنكار موجبها من المنكر {واعلموا أن الله شديد العقاب} لمن خالفه.