1-
Learn to Improvise and Be Willing to Adapt. Your players will often surprise you with completely unexpected ideas. Learn to accept them and mold the story around their choices instead of forcing their choices to match your preconceived script.
2- Don't use DMPCs. That is, resist the temptation of having a character of yours in the party, unless it's absolutely necessary, and even then, it should NEVER outshine the players.
3- Don't Get Attached to Your NPCs. Chances are they will end up dead or forgotten. Memorable NPCs are a real thing, but you should always think of them the same way you think of characters in Game of Thrones. ("This guy is kinda cool. He'll probably die.")
4- Give Them Real Challenges, But Don't Get Adversarial. Remember, the PCs are the heroes! They are supposed to be the stars of the game. Don't be pissed off just because they one-shot'd your villain. Sometimes it happens.
5- Assume Players Will Kill Everything! I'm exaggerating, of course. My point is: Always be prepared for the possibility of the PCs killing (or at least attacking) anything you place in front of them. Sooner or later they will attack someone or something when you were sure they had absolutely no reason to do so. Be prepared.
6- Never rely on a single roll! That is... Whatever plot, mystery or adventure you have planned should NEVER be dependent on the players finding that one specific clue, asking, that one specific question, etc. Always have at least 3 ways the players can reach the next step in the adventure. The more the better!
7- Let choices matter! Not everything has to be an open-ended sandbox with multiple possible results, but whatever choices you give your players should be actual choices. The so-called "illusion of choice" (where the results are the same no matter what the players choose, but the GM pretend their decisions matters) only works until it doesn't. The players always figure it out sooner or later, and when they do, it leads to disappointment with past "choices" and apathy towards future "decisions", thus making the game less enjoyable to everyone.
8- Be honest. Tell your players the truth about what kind of game you're GMing. Is it a plotless sandbox, a rail-road adventure or something in-between? Is it a mindless hack-and-slash, a game of political intrigue or something else? Are you willing to fumble or let the dice fall as they may? Whatever it is that you decide, be honest about it.
9- Listen to your players. Before, after and during the game! Ask them what kind of campaign/adventure/setting/etc they want. You don't have to agree or abide to anything, but listen what they have to say and actually take it into consideration!.
Last, but most definitely not least:
10- Remember: Your Priority is to Make Sure the Players Are Having fun! I know it sounds cheesy, but it's true: The GM has the most fun when the players are having fun. You'll quickly notice that you enjoy the game the most when your players having a blast.