Your story and its plot exists within a world. This world didn’t begin at the Inciting Incident of your adventure. Events, politics, NPC’s had been going on before your players’ characters arrived on scene, and will continue to evolve as the adventure progresses. As DM you do not need to know every detail of this world’s history. Know enough, however, to answer questions that may come up.
Don’t feel the need to have all minor details and minutiae of your world written down. If asked for a name or trivial detail, improvise an answer. Be creative, but not too outlandish. The logical and sensible path will cause you the least trouble.
Know all the motivations and dramatic forces and characters involved with the plot of your adventure. Know where the story is going both at its outset, and as it evolves with the players’ input and interactions. Look ahead to outcomes of different character decisions and see where events may lead. Understand that a good story evolves through actions and reactions, conflicts and consequences. The predicted outcome of an adventure may be much different near its end than was determined at its beginning. Your players’ actions will have everything to do with this.
Have an idea what major and minor story arcs exist within your adventure. Within those arcs, know the Inciting Incidents, factors increasing the conflict, the mid- and full-arc climax point(s), the resolution. Decide how each adventure session contributes to advancing these aspects of your story.