As someone with a little experience DMing, but who had to learn quickly and be good quickly due to, you know, effectively being paid to be a DM. These are a few of my random thoughts. Some are just stylistic tips, some are general good advice.
1) For mechanics questions, consult one book (if this is a DnD/PF situation of "Let's have 20 different books for our game!) or other source, then make a ruling that makes sense. Don't spend twenty minutes trying to get the rule perfect if you can spend two doing a good enough ruling. Nobody's going to notice or care, and keeping the pace is super important.
2) Do your best not to rely too heavily on another person for rulings or questions.
3) "Say yes or roll the dice".
4) Don't violate player agency. By that, I mean don't tell a player that they don't do something they specifically are saying they're doing. I wouldn't even heavily punish a player that wants to fuck around for a few minutes while the rest of the party does the "real" plot. Don't reward that, but don't be like "And you lose 10,000 experience points for pissing me off" or make the player take some long time delay before rejoining the party (unless that doesn't make sense). If they ask what they're able to do, make it boring and mundane.
5) Reward creativity. I had a situation where there was a challenge set before some players: They had to cut an ox free and move a cart that was pinning and killing an elf barmaid. The way they were "supposed" to do it (according to the module) was to cut two ropes and then make a check to move the cart. It was intended to be a pressure on the players, as there was also an assassin trying to kill them at the same time. One player had a weapon that let him teleport one ally, one enemy, and himself a square or two, and he wanted to use it to move the barmaid that was pinned under the cart. Had I wanted to stop it, I could have, because Rule 0
. However, it made more sense, in my head, to allow it, and I couldn't come up with a non "I'M THE DM, SHUT UP" way to prevent it, and it was kinda cool. I made up for the difficulty some other way, and let it roll.
6) Know the module. Even if you wrote it yourself, review it before the session. There have been times when I've unintentionally contradicted myself because I thought something went one way, then read the next section and realized it went another.
7) It may sound lazy or crass, but for most RPG systems, starting with a pre-written module, rather than trying to write your own campaign from scratch, really helps out. Balancing encounters and fights can be hard, and when you throw on it all the other random crap you have to learn, it can be devastatingly difficult. A blog I follow written by my DM explains some ideas about making the module yours better than I probably could at about-to-fall-asleep-on-my-keyboard o'clock
8) Don't worry about specifics. Don't get paranoid about making on the fly adjustments. Don't worry if it looks to you like the entire encounter is held together with duct tape and dreams. As I once heard someone somewhere say about set design, "It doesn't matter if it looks like shit from ten inches. It has to look fine at 100 feet". If your players walk away saying they had fun, you're a good DM. That's the yardstick, plain and simple, and don't let anyone tell you otherwise.