One element is the lyrics. If the lyrics are about dark topics like death, ghosts, or curses, it can be scary. For example, lyrics that describe a spooky encounter with a supernatural being. Another is the tone of the rap. A slow, deep, and menacing tone can add to the scariness. Also, the setting where the rap takes place. If it's in an abandoned place like an old factory or a haunted house, it gives a creepy vibe.