RPG campaign worlds need a certain amount of detail to be fun. So many GMs prepare the entire plot line up front, including supporting maps, NPC's, etc.
The problem with this approach is if the players think of a completely different way of achieving the objective than what the GM did. This threatens to obsolete all or most of the prepared material.
Worse yet, the GM may protect his or her investment by forcing the PC's to follow the planned plotline. This is called railroading; and players hate that. But there is another approach, one I call "Just-in-Time Worldbuilding", which is based on Just-in-Time manufacturing.
In Just-in-time (JIT) manufacturing, there is very little inventory of parts, and just the right amount of parts appear at the right spot in the manufacturing process at just the right time. Since JIT uses a "pull" system, where upstream processes dictate through signals how much to produce, instead of "push", where everything is planned up front, it easily adjusts to changes in consumer demand. A similar process can be employed when building campaigns.
When I GM, I don't lay out in advance a grand plan on exactly how the PC's are supposed to accomplish their goals. If I did, I'd be tempted to railroad the players if they try to deviate from my plan for them.
Instead, I detail history, items, groups, NPC's and places near where they're currently at and how they tie into the goals. Then I use those details to "wing it" during play based on what the players decide to do.
I build these details around the PC's between sessions, rather than all in advance, so I can adjust to the PC's actions. This also minimizes the wasted material I created in case they do something I didn't anticipate.
To figure out where the PC's will go next and what they plan to do during the next session, simply listen to them talk to each other. If they mention two or three possibilities, detail them all.
The level of detail should be enough to allow you to wing it during play. Not everything need be mapped out ahead of time, but if you create a map of a store or something during play, be sure to jot it down in your notes in case they come back later.
By anticipating where the PC's will go next and detailing just that, I give my players the false impression that my entire world is incredibly detailed and interconnected and the correct impression that they're in control of their actions.
Just like in JIT manufacturing, this approach to worldbuilding fills in just enough detail (the places they are likely to go) at just the right time (before the next session) using upstream signals (what I hear the players discuss in the previous session and where their PC's are currently located and what they just did).
If the PC's do something I don't expect, I save unused material I made up for a future adventure. If I design the material right, I could even drop that area into a completely different part of the world. Since the players never went there, they won't know the difference.
If you use these techniques, don't let your players know. As my brother once told me about being a GM, "Never let them see the man behind the curtain."