What if the players aren't interested in working as caravan guards?
What if they don't want to stick around town doing odd jobs?
And if they do not kill 5 goblins and deliver 20 Giant rat tails to the city watch then Asmodeus takes over the Realms, not even Elminster can prevent this
Nah pun aside, this is of course a classic critic point of "Sandboxes". Let us be clear there is no real sandbox.
In the 2e creative campaigning guide (A tremendously good general work on DMing) they differ between linear and matrix campaign. A linear campaign is obviously what we call railroading.
A matrix campaign also does not have limitless opportunities, therefore the more that you intend to run it as a true matrix the more enables you need: Time pressure, enemies (and allies) acting in a certain direction if the players do not interfere, other factors of interest which cannot be ignored by the players, e.g. wanted buy the law, get drawn into the conflict no matter what, need some cash to buy themselves something to eat.
This still requires a load of work on the DM (or Editor of official stuff at Wizards)
There is a solution which is a bit more simple with two options:
1. Pseudo matrix: The given encounters occur more or less in the right order like in a linear campaign, namely there where the players are going, no matter where that is.
2. Matrix, but not truly open world: The encounters can be approached in any given order, some are tougher, some are weaker, or the encounter toughness is adaptable (Mob strength CR and number), anyway the CR is always somewhat matching the group level, no truly overpowering encounters and if so then more than one warning that it might be to much for the group.
LMoP is something like 2.
But no matter what style, it still requires the group to go anywhere. And if they never take the bait then do not hesitate and let big evil win for a change. Their next characters have the harder job to fix all that what the first group should have prevented.