Mystery is everywhere. It’s in stories, it is real, it surrounds our everyday minds. When writing a mystery story the best advice I believe you can get is, make the story reasonable and believable. Some writers use suspenseful words and phrases to enhance their power, see the list here. Others use tools like red herrings. This will keep the reader engaged and will urge them to keep reading.
You want to plan out the mystery first. Give it a setting, a motive (if its a murder or generally anything that would need a reason to do it), and people to affect.
Make sure there is no way that your plot has holes in it. Plot holes are a huge problem in every type of writing, but it is much worse that when it is inserted into mystery writing. You want to make sure the story flows and doesn’t give too much away.
Hope this helps anyone and if you have questions feel free to send a message and help you on your journey. Good luck fellow writers!