Question: What is the ruling on visiting monumental places, like the Mada’in of Saalih or the Pyramids?
Answer: “Travelling towards it is not allowed. If he passes by it on the street and looks at it for consideration and a lesson, like the houses of Thamud at Hijr, then there is no harm. Not entering it is better due to the statement of the Prophet (ﷺ) when his Companions radiallahu anhu passed by the Houses of Thamud:
لاَ تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلاَّ أَنْ تَكُونُوا بَاكِينَ، أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ
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
[Reported by al-Bukhari no. 3381]
So the purpose of travelling to visit them is not allowed. However, if he passes by it on his path and enters it for consideration and fear of Allah, then there is no harm in this. As for entering it with amazement and relaxation, then this is not allowed because it is not intended for Allah. The Prophet (ﷺ) said:
Do not enter the ruined dwellings of those who were unjust to themselves unless (you enter) weeping.
As for going to idols or statues or what is called the Sphinx, then this is not allowed at all. This is an evil. Do you go to see evil? This is evil. This is not allowed because these statues are not allowed and if he visits them he will be affirming them, not detesting them. So he does not go to them. Yes.”
[Taken from: https://www.alfawzan.af.org.sa/node/3123]
Faisal Ibn Abdul Qaadir Ibn Hassan