Forbiddance
The spell damages specific types of trespassing creatures. Choose one or more of celestials, elementals, fey, fiends, and undead. When a chosen creature first enters the area on a turn or starts its turn there, it takes 5d10 radiant or necrotic damage (your choice when you cast the spell). You may designate a password. A creature speaking this password as it enters takes no damage from the spell.
After casting this spell on the same area for 30 consecutive days it becomes permanent until dispelled. This final casting to make the spell permanent consumes its material components.