I was kinda laughing at this because what else does the DM do but make stuff up and why does it matter if you do it during the game or before but then I saw who posted ... the guy who BUILT RAVENLOFT CASTLE and how amazing would it be to play at that table? That's Masterwork DMing.
My style is a bit lazyer. Given a 2-3 hour sessions, what I do is prep a couple of things most likely to happen and make up the rest. Like, as my players will enter Barovia Town tomorrow, I'll make a little flow chart, like Weeping Lady-Tavern(Ismark&Vistani)-Witch-Burghouse(Ireena)-Church-Hangman Crossroads-Madame Eva. That's the most likely sequence of events. If they go to the Church first that's fine. But if they get through all that in one evening I'll be psyched. If they blow through town I guess I'll just roll with it, probably including some random encounters for some action.
My group likes to play D and D as a table top board game - we're not into role-playing per se. What I try to do is rather than give them choices of where to go (because I invest a lot of time/prep work in each scene, its not much fun for anyone if they dont have reason to go there and/or dont choose to go there), I give them choices of what to do there, and have ramifications of those choices.
So in my campaign, the players begin with the letter from the burgomeister, I give them the option to buy whatever equipment they want and to prepare spell lists, then <cutscene> they arrive at Barovia. There they see zombies running amok and have two basic choices I give them: kill the zombies/save the town or avoid the zombies and reach out to the townsfolk - so take curtain a or curtain b, no sandbox here. I have a village built in 3d (8 buildings or so in the center of town and the rest declared irrelevant in game terms) w/zombie figures ready for the fight if they choose, but it took me only an hour or two to build/prep (I have 4 custom zombie swarms pre-statted and their sheets printed), so if they want to avoid it, its coolio.
If they fight the zombies and win, they get +4 to their rolls for Persuade, Perform, Intimidate, and Investigate in the town.
Irregardless, next up is the "town gather info" phase. I show the players the village I created (if they haven't seen it already fighting the zombies) and tag the buildings "inn," "church," etc for ease of reference. They then go into any/all, in whatever order they choose, as an entire group or split as desired. In each building the PCs do a brief skill challenge (3 successes before 2 failures ala 4e). I have condensed the knowledge each NPC knows into 3 parts, and each success before 2 failures gets them 1 bit of that info (or possibly even a valuable item given to the PCs to aid them in their quest). Failure by 5+ means they get possibly deceptive info (which I have pre-scripted, I dont make it up on the fly).
If the players feel up to it, I role-play the skill challenges briefly with them (sometimes they just want to get to the "action" and could care less about talking to the barkeep), with a -2 to +2 awarded (we usually decide on the award quickly and consensually together as a group) to their rolls (I make the rolls secretly so they don't know whether they rolled good or bad and gain metagame info) based on how well they role-play it. After this, I give them the menu of goods/services available in the town then <cutscene> to next morning (although dep.on their rolls against 1-2 npcs, they might have a nighttime preset encounter (again, using the same 3d map I prev.prepped, so no biggee if the encounter doesn't happen).
As a result of their intel in the town, they will know their next stop (in my heavily modded campaign it is vallaki), why they want to go there (in my campaign it is to solicit aid from the great vampire hunter Von Richten in bringing down Strahd), and may have tidbits of extra bonus info/items gained from their skill challenges that will help them. Notice that as a DM, I don't make any decisions once play begins excpet how to run my monsters, the pre-written script and player agency alone is what makes the story develop.
I give them a little time to discuss/digest, then they are off to Vallaki. Now <cutscene> the players travel to Vallaki is interrupted by an encounter w/a Vistani camp. The players may avoid, fight, or parley. I have the 3d map prepped and ready, and Madame Eva's fortune telling pre-scripted. If the players fight, we run the battle and the players will have auto-hostile encounters w/any Vistani they run into in the future. If they avoid, I have a back-up reading contingency plan for Vallaki. If they parley, they get a skill challenge to gather info from Vistani, the card reading (done as a skill challenge also), and they get a menu of goods/services available.
I give them a little time to discuss/digest, then they are back on the road to Vallaki. Now they make a Survival roll to determine if they have a road encounter (I have several prepared encounters, in a set order, available). Their roll indicates 1 encounter, so <cutscene> their travel is interrupted by an encounter with the Headless Horseman!
and so on.....
So depending on a group's personalities and gaming preferences, this style of play might be preferred over the wide open sandbox approach. Certainly if you have much time to prep, it can allow you to develop encounters more rich in visual appeal, rife with choices, prepped to allow for fast-paced action packed play, and overall depth of immersion.