If it's a mistake to go, "Oooh Shiney!" and too-easily get distracted from your goal . . .
And if it's a mistake to go, "Stay on Target!" and stubbornly refuse to get shifted fron your goal . . .
. . . then what is a poor adventurer to do?
Without a rule that is "Always turn left!" or "Never get out of the boat!" and can absolutely be followed, how can a delver delve?
It's really some variation of this:
Always keep the goal the goal.
I've heard this stated a few different ways by a few different people - usually attributed to someone's ancestor or old neighbor or something. I doubt it's a new concept.
It's simple in thought but together in execution. Pretty much all "how to succeed at adventuring" guide has some variation of this. And it's harder in practice than in statement.
You just keep re-evaluating, what's the real goal here?
If staying on target gets you there, you stay on target. If veering off gets you there, you veer off.
Is it possible?
A pitfall of this approach is, you need to really know your actual goal. Not just your stated goal. You must know what you will actually strive to do when it gets tough.
If the goal is, say, garnering treasure, then anything that best advances the garnering of treasure is worth doing wether or not it's part of the original plan.
If the goal is defeating evil, then anything that results in defeating more evil is worth doing - again - wether or not it's part of the original plan.
If your goal has contrary aims, you're going to struggle with this on. If you aim to defeat evil at all costs while getting as rich as possible, well, when the Truly Evil demon-worshipping vampyre-lich-troll says he'll reveal his otherwise unobtainable loot stash in return for his unlife, which do you choose? Or if going left fights evil and going right leads to loot, and you don't have the resources to do both, do you go right or left? The one you choose is your primary goal. If you don't know - or the group is split on which is "nice to have" and which is "the plan" then trouble will ensue.
Goals with hidden contrary aims also present a problem. The often-unstated, ". . . without undo risk or getting any PCs killed" addendum to most goals is also a contrary aim. You can't get maximally rich, or slay all the dragons, or fight all the evil, or find the bottom level of the dungeon, or whatever and satisfy that goal easily. If you try to do both, you usually veer off of the stated goal to satisfy the concerns of the unstated goal of minimizing the chance of harm. It can sometimes get you killed anyway when you turn away from a known risk into a "surely less dangerous" approach that contains more risk.
You can have a goal that's a little more vague - fight monsters, or investigate interesting things, or something of that sort. If you all understand what that consists of, it's easy enough to follow through on. Such goals rarely get coupled with "Stay on Target," but it's possible.
Overall, though, this maxim is something you do benefit from keeping in mind. Your plan isn't ruined if you're distracted by something that advances your actual goals. Your plan is worth a repeat of "Stay on Target!" if the distractions or opportunities don't further your goals. Sure, those are fun monsters to fight or that door is interesting, but you are after loot and know where it's to be found.
There isn't anything min-blowing in this post, but it's true. The goal is to keep the goal the goal, and not to let that slip aside too often. The goal of the game is to have fun but there is usally a specific in-game goal you're after. Figure it out, get agreement on it, and try to stick with it and it's usually easy to figure out what to do.