Abdullah bin Umar reported,

We passed by al-Hijr with the Messenger of Allah ﷺ, and the Messenger of Allah ﷺ said to us, "Do not enter the dwellings of those who wronged themselves unless you are weeping, out of fear that what befell them may befall you." Then he urged his mount on and quickened his pace until he had left the place behind.

Azami 12611

Sahih

عن عبد الله بن عمر قال

مررنا مع رسول الله ﷺ على الحجر، فقال لنا رسول الله ﷺ: لا تدخلوا مساكن الذين ظلموا أنفسهم، إلا أن تكونوا باكين، حذرا أن يصيبكم مثل ما أصابهم. ثم زجر فأسرع حتى خلفها.

الأعظمي 12611صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "And certainly, the people of Hijr denied the messengers. And We gave them Our signs, but they turned away from them. And they used to carve from the mountains houses, feeling secure. So the blast seized them in the morning, and what they used to earn did not avail them"
Numbering
Jami al-Kamil 12611 (2nd edition)
Azami 12611