Common elements in a sad ghost story include a feeling of loss. This could be the loss of life, love, or hope. The ghost is often a symbol of this loss. Then there's the idea of being trapped. Whether it's in a place or a moment in time. For example, a ghost trapped in the place where they died. And of course, there's a touch of the supernatural that adds to the sadness. The fact that they are no longer alive but still exist in a way that is so different from the living makes the story sad.
One common element is a tragic past. Like in many sad ghost stories, the ghost has experienced something really bad like death in a cruel way or losing a loved one. For example, a ghost who was killed unjustly in a murder. Another element is a sense of longing. The ghosts are usually longing for something they can't have, like their former life or a person they loved. Also, a spooky setting is common, such as an old abandoned house or a dark forest where the ghost resides.