Okay, let’s be serious for a moment: like 80% of the whole “being a GM is like herding cats” thing is because you didn’t bother to communicate to your players what the game was going to be about and expected them to figure it out by reading your mind.
I promise you, if you’ve written up a fancy new dungeon and ask your players “hey, want to play a game about exploring a dungeon?”, it’s quite likely that they’ll be more than happy to go to the dungeon.
Hell, save them the trouble and just start the game with them already in the dungeon – as long as you clear it with your group in advance and don’t abuse the privilege to drop them into a pit full of rust monsters on turn one, they’ll probably just go with it. In medias res is your friend!
And on the off chance that they say “no, we don’t want to go to a dungeon today”? At least you found out up front instead of pissing around for a couple of hours first – there’s literally no downside to opening that channel of communication.
(There are admittedly a small minority of players who this won’t work for because they actively and deliberately obstruct whatever they think the GM is trying to do, but they’re contrarian assholes and you shouldn’t be gaming with them in the first place.)
And most of the remaining 20%? Is because you tried to plan for your players taking a specific set of actions.
Here’s a secret: don’t plan for any player actions whatsoever. Plan what’s going to happen if the players never showed up at all.
It’s easier to let go of a plan that’s designed to be disrupted, and coming up with a good answer to “what would happen here if the player characters didn’t interfere?” forces you to think carefully about the needs, resources and and motivations of everyone involved, which is far better preparation for responding to player shenanigans than any amount of what-if speculation.