The best advice I heard recently was to learn what you're good at making up on the fly and then focus prep on what you're not good at. I'm terrible at remembering monster abilities and resistances so I make sure to write those down as an aide d'memoir when preping. I more or less make up plot as I go along...
Change is interesting, stasis is boring. Ergo, when the players take action, something changes. Turn "you miss" into "you miss, but the ogre turns towards you now, snarling in rage..."
Knowing exactly what will happen is boring; having no idea at all what will happen, is also boring. Both scenarios deny decision making. Aim for someplace in the middle. Turn "you can go left, or right" into "the left corridor shows signs of frequent passage by small humanoids; the right passage seems undisturbed, and a stench of death and decay wafts towards you..."
Being a passive observer is boring. Making decisions with real consequences is interesting. So when the players mess up your plot, derail your story, and kill your villains... let this part be interesting for you, too. ;} Turn "well, uh, at the moment of his death, he teleports away!" into "as his brains leak out onto the floor, it occurs to you that his organization still exists -- and that several of its prominent members will now be rushing to fill that power vacuum..."
Don't allow boring things to happen. These aren't the only boring things, but they are a good start.
Play lots of games. Play games which take very different approaches to roleplaying. Play Apocalypse World. Play The Mountain Witch and Burning Wheel, Traveller and Primetime Adventures, Fate and Call of Cthulhu. Keep an open mind.
Session zero is probably one of the more consistently stated pieces of advice, and it's a good one. However, it's one that applies as much to players as it does to GMs, and this is a thread for GM advice, so mine will focus solely on that particular objective.
For my two coppers, my number one piece of advice is to keep the focus on the players.
What this means is that the players have the ability to affect the world for good or ill, and you continually call on them to do so. It also means you somewhat have to frame your plot and setting around the fact that, as another poster put it: "no plan survives contact with the PCs". You have to constantly be re-evaluating the effects of their actions and what information they have at their disposal, and adjust accordingly. This is difficult to get used to because it flies in the face of conventional storytelling, but it's also what makes D&D as magical as it is, in my opinion. The idea that even in more structured adventure paths there's so much room to be surprised or alter the story, based both on player choice and how the dice fall. The downside is you have to constantly steel yourself against cop-outs like railroading and overpowered DMPCs.
What I'm trying to articulate (poorly) above is that your PCs should always be first in the context of how you go about creating the story and setting, constantly asking yourself why the characters should care, what's their stake in this event going on, how can you challenge them, both individually and as a group, what their goals and aspirations are, and so on. Working from this angle will help you keep your players engaged in the story and the world, and that has been the most consistent factor in player enjoyment in my experience.
Session Zero is also something I thought about, but at the end of the day that advice is about communication. Don't just communicate with your players during session zero, be as available as possible to field questions and ideas and talk to your players about the game and their concerns.
Seeing as how that advice has been given a lot though, I don't see any reason not to give more.
Steal from Everywhere. Steal names, steal plots, steal monsters, if it is nailed down make sure to bring a hammer to get it anyways.
It won't always be obvious to your players, for example I'd imagine anyone on this site would probably know who I was refering to if I created "The Cult of Shelob".
Many fewer would have any idea what I was refering to if I told the "Arlong the Cruel has taken over a small fishing village"
Would anyone know what was going on if I set an adventure in Symir, the Drowning City or if you were fighting a user of Vemic energy (I honestly don't know if that last one is a real thing or something the author made up)
Sure, sometimes they'll call you on it, but you may be surprised how often they have no idea you are making a blatant reference to something else, like cursed red gold.