There is a symbol in Buddhism, the name of which I forget, but its function is to sleep peacefully under the pillow. I read it in a feng shui book.

Buddhism does not draw symbols, while Taoism draws symbols. Buddhism says that purple chalcedony (purple agate) can relieve depression, fear, hysteria and sadness, help people abandon material things unrelated to spirituality, and remove unnecessary memories and burdens in the brain. Putting it under the pillow can protect the safety of travelers, prevent accidents and witchcraft, and eliminate nightmares and fear of darkness.

However, I advise you not to be too superstitious. From my doctor's point of view, you always have nightmares because of both physical and mental reasons, especially because you always have the same nightmare, which must be closely related to mental reasons. Adjust your mind, relax, exercise properly before going to bed, and keep the sleeping environment well ventilated, so you will naturally not have nightmares.