Let the party know the cost of failure
The first thing to do is to let the party know that there are consequences for their actions, beyond experience points for kills. If they simply don’t get the money and side-quests that Sildar might have provided, they won’t even know what they missed out on.
Go ahead and withhold the rewards, and have another NPC let the characters know that Sildar had access to considerable reward money — and useful information — which is now unavailable.
Make sure the party knows this is not a video game
Players these days sometimes treat NPC’s like they might in a video game. They show no concern for the NPC’s survival, because they assume a character important to the plot cannot die. Or they take an item from the NPC and don’t bother completing their quest in a timely manner.
You can inform the players, in game or out, that your NPC’s won’t stand for being treated like video game automatons. A Phandalin villager (maybe Sister Garaele) might chide the PC’s, “You treated Sildar like he wasn’t even a real person, like he was just there to provide a colorful detail to your big adventure. I don’t know what kind of game you think you are playing.”
Back that up with real consequences. One idea based on the literature is:
Linene refuses to sell the party weapons because she believes they are bloodthirsty mercenaries, no better than the Redbrands. To earn Linene’s trust, the party must “go the extra mile” — perhaps by retrieving Mirna’s jewelry from Thundertree.
The show must go on
On the other hand, there’s no need to write out parts of the adventure because things didn’t go as planned. Just find other NPC’s to move the story along. Here’s one an example how:
One party I ran through Phandelver took no interest in the dwarven brothers, and kept killing the bad guys without interrogating any. They dove into the side quests, but took no interest in the main quest. Knowing my audience, I made the necromancer at Old Owl Well a beautiful “Goth” woman with a sob story about learning necromancy at a school for orphans. Sure enough, they did not kill her, and invited her to join the party. I added to her backstory that she was seeking the Forge of Spells, and the party was “back on track.”
Sandbox vs. Prepared Adventures
If you were playing your own sandbox adventure, you might consider “skipping” part of the adventure, letting the bad guys win, and figuring out where your campaign goes from there.
But you seem concerned with getting your value out of the adventure you purchased. There’s nothing wrong with that. Especially if you are a new DM, this introductory module gives you a good framework and guidance, and saves you some work.
You just want to make sure you stop short of railroading your party into an adventure they don’t want.