The Messenger of Allah ﷺ cursed women who visit graves, those who built mosques over them and erected lamps (there). (Using translation from Abū Dāʾūd 3236)
لَعَنَ رَسُولُ اللهِ ﷺ زَائِرَاتِ الْقُبُورِ وَالْمُتَّخِذِينَ عَلَيْهَا الْمَسَاجِدَ وَالسُّرُجَ