Plot details are constraints only for as long as you choose
Sometimes it's a little tricker, taking @Anne Aunyme's example from the comments:
If there is a villain who will destroy the world in exactly one year if nobody stops him and the only clue that can bring the PC to him is in one specific dungeon, you can't let them completely skip it.
All these details are defined by the campaign and can be "rewritten" by the GM.
"The only clue" is a motif in mystery campaigns - it sounds cool, but it's a symptom of railroading. Add another clue that lets the players proceed through the plot in a way better fitting with their character stories.
"One specific dungeon" - again, when there's only one thing the party can do, that's when they are most likely to rebel and reject. But, if you must get them to a particular place, let them pursue their interests for a bit, get them really mad at some villian, and then let said villian disappear through an Irresistably Tempting Blue Portal™ to your dungeon. See if they don't follow him. (But typically, you can just move the dungeon to the setting of the player's choosing.)
"Exactly one year" - unless other heroes, or the gods themselves, intervene to buy the world a little more time. Or the characters dawdle, and the world is destroyed, but the party is transported back in time to try again. Or the villian was wrong, the world isn't destroyed, just drastically changed - the party now needs to proceed through the plot to bring it back.
Giving the players a little latitude will almost always get them back on board, pretty quickly.