Answer:
A mystery book can be either fantasy, nonfiction, realistic fiction, or, any genre, really. So first, I would pick my genre. Then, I would select the main plot of the story, or the mystery (ex: a murder mystery, if someone went missing, or maybe a haunted house kinda thing). Then, I would select the characters and their personalities, then shape the main character, whether they're the detective, like in Nancy Drew, or the one causing/part of the mystery. (hope this helps)