Messenger of Allah ﷺ said, "Do not enter the ruined dwellings of those who were unjust to themselves unless (you enter) weeping, lest you should suffer the same punishment as was inflicted upon them." (Using translation from Bukhārī 3381)
قَالَ رَسُولُ اللهِ ﷺ لَا تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلَّا أَنْ تَكُونُوا بَاكِينَ أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ