Welcome, new MD!!
If you're here, I assume you're new to being the DM of your group, welcome to this little guide and tricks to avoid going crazy!!
So, the anti-madness, right?
Set limits.
The DM is always right (unless otherwise stated)
Your players ARE the protagonists of the story!
Take notes! Lots of notes!!!
Create your own PNCs!(but do it right!)
Anyone can make a character, but it's hard to make a good character, so remember this:a non-player characters are great for highlighting playable characters. For example: In a small town, there is a... a pack of wolves that keeps bothering the local butcher (for example) and a character asks your players for help. And This character is the town defender. An archer (who uses a crossbow), he has good aim, but is very slow and can't fight in hand-to-hand combat. Therefore, your players have to protect him. Also, this kind of characters should always be "support characters". Yes, support, like a medic in a video game lol.
I mean, don't let your players run wild in the world. And please, keep the group together. Let them do their craziness shit, but keep them aware of the consequences - that keeps your players self-regulated and from destroying the world. Your players are people too, you can't stop them from doing stupid things, but you can limit them! But this depends on each person, Get to know your players before you play my little DM!!
You don't need to worry about the rules to the letter. If during a session, something comes up in the game and you're not sure what rule applies, or how a rule might apply, you can stop the game and look up the rule (and discuss it with the players), or you can make a ruling on the spot and the game can continue. If you and your players haven't been playing for very long, personally I recommend making a ruling on the spot at first and making it clear to the players that you're making a decision now, and that you'll check the rule later. Keep the game moving - you don't want your players to get bored!
After the session, you can look up the rule and discuss it. If you get it wrong, it's not a big deal. At the next session, you can tell the players what you've learned and let them know that, in the future, if the same situation occurs, everyone will follow the rule as they've learned it. Everyone makes mistakes... and the DM's guide is 320 pages long. Don't be ashamed of yourself for not memorizing that.
You tell and narrate the story of your players, the protagonists, they move and change it. To these changes you react by narrating what happens, but never by taking revenge or retaliating for the action they have taken. Well you can intervene as long as the intervention is a natural reaction in the world. You can be cruel, merciless and harm your players. Monsters are a part of the world, so are towns and governments. If your players assault someone in a town you can go and have the police look for them. Remember every Action has a Reaction.
Whether you use a physical notebook or your laptop, take notes and then more notes! Take notes before the session starts in the form of bullet points or a script of what you expect to happen in the session. Take notes on monsters that appear and any special abilities you need to remember. During the game take notes on any NPCs you create as you go. Take notes on things the players say or do that you can use for the main or player-focused side story.
It's also helpful to have notes or a summary of your players' characters, with their skills, stats, etc., just in case players are inexperienced or don't understand a certain class skill and use it incorrectly. You don't need to have a character sheet for each player, it just helps newer players, and it doesn't need to be the entire character sheet, but something you can quickly refer to that doesn't slow down the flow of the game.