Let your readers in on something that the main character doesn’t know. Maybe the reader knows the next-door neighbor has a key to the house but the main character doesn’t know it yet.
Develop a setting to fit the mood of the story. Frighten the characters and the readers will identify with them. Rain and fog at night adds a scary element. During the day, the character might enter a dark house or tread down creepy stairs to a damp, dark basement.
Add a surprise ending. If the reader can figure out they mystery, the fun of reading the book is diminished. Consider many options. The ending has to be logical and follow through with the clues you’ve included throughout the narrative.
The character should solve the mystery by logical means, not rely on hocus-pocus, intuition, or anything other than the clues. Never try to fool the reader by being unclear in the writing. That leads to confusion, not a mystery.
Reveal the culprit or solution to the mystery at the end of the story. If the mystery is solved too early, the reader has no reason to continue reading.