Then if they genuinely are completely unprepared, they should answer honestly:
"I don't actually have anything prepared for doing this, and I'm not up to improvising it tonight, so this will need to be the end of the adventure proper for this week. I'm happy handling downtime activities, or any bookkeeping we've been neglecting, but actually running the game will have to wait for next week."
I don't see that, in any way, as railroading. It is the GM being honest that their skills are not up to the task right this very instant, but that with a little bit of prep work--presumably in the area of "NPCs that might appear, general information about the area, a couple landmarks plus ideas for more directions to explore, etc."--they'll be able to improvise for whatever gaps remain.
I'm jumping to the depths of a deep thread here, but this sort of stuff is why having a good collection of random tables by terrain type to fall back on when your players inevitably go in a direction you didn't plan for is such a wonderful thing. Even the blandest "4d4 Kobolds" ->
straight to combat can easily have life breathed into it by the PCs interacting and the immediate setting of "swamp". And of course, there is a universe of more ornate stuff out there: reaction rolls/"what are the monsters doing", random landmarks, collections of mini-lairs, encounter tables with subtly implied settings, hand crafted tables that tie back into the factions and conflicts of your campaign, weird stuff that instantly gets your imagination going, etc. But even the basic ones can do just fine. You can just give your game over to the dice, let the machine lay the tracks as you go, not much more improvisation necessary than your average module text. More than enough to fill out the rest of a session - it can really feel seamless - and provide enough to fill in the details between sessions. Perhaps not as intricate as a carefully crafted dungeon or murder mystery, but not everything needs to be that, and its almost certainly much more fun than just ending the session and revealing the hard edges of your shared world with the players, as if it were a video game.
To me it just seems like a fundamental DMing tool that (imo) bizarrely seems to get less emphasis, in terms of content and pedagogy, with each new release. Give the people random tables! Give them advice on how to use them! Give them advice on how to craft them to imply and simulate your setting, and hook them into further adventures! Let both the DM and the players be surprised and delighted by this wonderful and infinite medium! Luckily there is so much great stuff out there to use already, but it really seems like it should be part of everyone's "DMing 101". Sandbox play really doesn't need to require hours and hours of intricate worldbuilding and prep.
On the main subject of the thread - I think there is a great place to railroad, and that is at the start of campaign. You can put your PCs in all sorts of fun situations that would be awkward to engineer organically. Throw your party on a prison ship without having to engineer their arrest. Have the king be dead with your PCs holding the bloody dagger. This is one reason to love one shots - they let you railroad (an inclination which often contains within a noble impulse to bring PCs into contact with an interesting scenario the DM has planned), but sans any dampening of player agency. And of course, you can do this in an ongoing campaign world, just start up a new B Team party and put them in the middle of a weird Rube Goldberg-esque scenario - maybe its effects will ripple out to the A Team later on.