When preparing a game I try to think about the various plot threads. They’ll vary from ones I’ve introduced to something in the player’s backstory or even something they’ve found along the way that I never thought would be part of the story. The important part here is to work on the threads that the players feel are important and develop those if possible.
Now there’s always a chance that they’re following the “wrong” thread or ignoring the “right” thread, but as long as you’re not running a one-shot, let them wander around. This is everyone’s game, not yours. That being said, if there’s nothing in that cave, tell them that. We’re all busy people and no one wants to spend an hour following a shadow that turns out to be a squirrel.
Last—and hardest—is if you have a thread that you particularly love, but your players aren’t following then you should revise it or let it go. Maybe they have no interest in the plight of the gnomish shopkeeper until they see them get evicted from their shop and become homeless. Maybe there’s no interest in saving the elves of the forest until they become bandits on the road. Or maybe picking up converters from Tosche station just isn’t that interesting. That’s cool. Just let it go.