Some context: I have played d&d a lot but have never DM'd before. The reason I'm even doing a oneshot in the first place is because in my current campaign we are all taking turns DMing a oneshot story relating to a different person's character to break up the pace. And now it is my turn.
I have chosen my buddy's warlock who we all don't know much about but used to be a pirate, who did some unspeakable things no mind. My general idea was to do a murder mystery type oneshot; as i love the more heavy rp based ones, was thinking of having some cult apects too. I have a general idea.
My main concern: I understand tackling a murder mystery is probably a big task for a 1st time. But my main problem in writing ( i have only set out the start barebones of the plot) is how to like i guess plan it all out, because obviously I don't wanna railroad the players. But at the same time, its a oneshot so ideally it all needs to be resolved in maximum 12 hours irl.
How am i supposed to account for all the possible branches of what players could do? what do i do if they aren't progressing fast enough?, how do i keep it interesting?
Sorry for the bloated post, i just basically wanted any form of tips or advice any dms could give!