When you lay down plot seeds for railroad games, it's fairly straightforward. There are few tracks to note and each seed can lead to one or each of them. Sandbox games contrast this in an interesting way. There are many more tracks the players can engage in and character agency falls stronger on them than the DM. Three things I've found which can make sandbox games flop are the following: being too rusty thinking on your feet; plot not revolving closely enough around the players; and sandbox game plots being too specific on the DM's side.
Improvisation is among the most useful skills a DM can pick up. If the players run off the planned course, which in sandbox games means all the time, it's important to be able to roll with their decisions and have adventure wherever they wander. Here it's necessary to focus on the small things instead of the big things. That doesn't mean rats instead of dragons: Quests and story arcs should all be inspired by small things like rumors instead of big things like orders from the king. Working too far down any plot-road can all too easily leave a DM with little wiggle-room at the table. The trick is to keep any plot seeds open-ended so you can whip something up when the session actually happens. Rumors are easily garbled as they're passed along but orders directly from an authority figure are more difficult to weasel out of.
Any game should focus more strongly on players than NPCs. This is especially true in sandbox games. All prep should be tailored for the adventure the players have planned. Leading players anywhere defeats the purpose of a sandbox game. When they don't follow up on the quest of an intricate espionage challenge involving a guild fleshed out down to each informant, not only is all that prep wasted – you might even be tempted to try and find a way to work them into that, railing the game and subtracting from player agency.
One tactic I've found useful is to make generic events, people and places. That way anywhere the players go, there's adventure. You can fill in the blanks when it's time to do so at the table. It's much easier to improvise when you've got a large list of things not requiring specific conditions. Take a wizard for instance. If this wizard is mayor of the city of Townsburg and involved in all politics therein, they won't thematically fit in your game unless either the players go to Townsburg or the wizard has business outside the city. Instead of deciding they're the baron of this or that city, you could just decide they are a ruler. As your players work their way into a story which requires meeting with the ruler of an area, this character would fit seamlessly. Places and events can also be stripped to their bare-bones details so that they may be suited better to your players' decisions in play. Happy improvising!