The Good Dungeon Master must be a good Referee.
D&D, as well as any other rpg, has rules (both canon and house rules) and you as a DM must uphold them.
Let's see how to do.
Rules are at your service
Many times you'll be in situations where to strictly follow a rule will lead into illogical consequences.
Or you'll want to describe something who's happening without following the rules or avoiding a dice roll, even if the rule tells you to do so.
Just do it without exhitation but explain if someone asks you why.
When you take your decision, your decision is taken
Quit long discussions about the correct effect of an action or of a spell.
Make your call and go ahead.
However you always should be available to talk later and change your mind for next times.
Favor the game
If a player has a clever idea about an action or a use of a spell and you're doubtful if allow it or not, then allow it.
Main game's goal is fun, and players have it also by having clever ideas and seeing them happening in the game.
At least you can allow it for the moment and say you'll analyze better off-game, to officially accept it for the next gaming sessions.
Be fair and coherent
Same calls and rulings for all players.
No special treatments.
Let your players keep track of hp, spells, slots, missiles, rations and so on.
As a Dungeon Master you've already got so many things to manage and it's better you keep only what's really important.