Nobody likes to dwell on their past mistakes, so I'm going to give you the opportunity to revel in some of mine. I've fucked up plenty of times as a GM, whether I was having a bad day, or railroading a plotline, or not effectively communicating with the players, there have been plenty of times where I've done something at the gaming table and looked back on it thinking "Why did I do that? What is wrong with me?"
The empty crypt!
I ran a fantasy game for a long time where the PCs had set themselves up as pseudo-permanent guests in a castle far off the common trade routes. I had established that before the castle was a farming outpost it had been initially constructed as a prison, and the lower cells had been sealed up. In one particular session there was a big, bad magical field that sprang up out of the castle's ground, however it was invisible and only the resident wizard could see it. (In my notes I had written that this was a pathway to another realm and weird ghostly entities were now squeezing through it.)
The players decided they needed to know where this thing was coming from and wanted to stop it. Since it wasn't really coming from anywhere I didn't have any information to give them, but fumbling about led them to the blocked off prison cells and in my notes I had an elf ghost laying dormant down there. They spent at least an hour at the table and a couple of days in game time trying unblock the prison pathways and all of my efforts to make the attempts fruitless went unheeded and ignored. Eventually I just gave up at trying to make it hard and said "Look guys, there's nothing down there. Your solution is elsewhere."
What I should have done: Is run with it. I should have chucked my notes aside and just let them find something causing the rift. It didn't need to be movable, and it didn't need to be indestructible either, but it would have been something to discover that would have made their time worthwhile and it would have given them a new focus.
I ran a GURPS sci-fi game for about a year where one player had min-maxed his stats starting out so he had tons of money and equipment. He asked if he could purchase a mini-nuke from the Ultra-Tech sourcebook and at first I balked then I re-considered and said "Sure! Why not?" all the while thinking "It doesn't have to be a working mini-nuke." The player would always refer to his mini-nuke as a last ditch weapon that he could use, but at the same time his character kept it secret from all of the other characters. Eventually I got tired of him bringing up it's existence and a psionic entity probed his mind, discovered where it was, and stole it from him. He wasn't pleased.
What I should have done: Give him a reason to use it. I had already established in-game that a well-funded group of criminal scientists were hiring assassins to take them down. This was a planet-hopping science fiction campaign, so I could have easily put them in a situation where they were outgunned by other starships chasing them and he could have finally had an excuse to use his mini-nuke and save the day while destroying all of the enforcers this group was sending after them.
The poisoned patient
I ran another sci-fi game, a much shorter one, where the PCs had just given refuge to a dissident from a cult. Before they could leave, another cultist had poisoned the defector and after they left the planet the poison began to take hold. His condition became noticeable when he began to suffer from mania which eventually turned violent. The PCs sedated him and put him in sick bay hoping to rid him of the toxins coursing through his system. He was an unimportant character and I narrated that he was dead, but one of the characters was a medic and wanted the opportunity to save him. I allowed a dice roll and success after success kept the patient going. I think we rolled the dice six times and he just wouldn't die, until I made a Luck check for bringing him out of stasis and he finally bit the dust. In that moment I forgot about serving the needs of the players and was focusing on trying to get the game back to where I wanted it to go.
What I should have done: Just let the bastard live. He wasn't important in the grand scheme of things and could have easily just disembarked the ship at the next port, but I was being short sighted, because the character could have also become a reliable NPC contact for the group later on.
Nothing happened today
I ran a Deadlands game once where I planned out all of the events surrounding the players and I would write then print off the front page of the local paper to show them all what was happening in their town. Except I never had anything interacting with the players, and I relied upon them to interact with the town and create drama. I realized a little too late how boring that could be.
What I should have done: Let the players be the stars, not the spectators. This was an early attempt at GMing and at that time I believed I had to create elaborate stories and backstories for all of my NPCs and the events around them. Instead of letting it fall out of the playing organically, I had written a script which the players could interact with but really couldn't change anything. In that sense, I was merely showing off.
Roll to climb a rock
One of my very first experiences as a GM, I had people rolling dice for everything. There was a chase in a tunnel and the PCs had to climb over a rock to keep going. I made them roll dice, and when somebody failed their pursuers caught up to them and I suddenly didn't know what to do because they were being chased by violent guys who could easily kill them. The whole session lost steam halfway through because I broke out the dice for, literally, everything.
What I should have done: Not be so nervous. I really wanted to impress everybody at the table and I could tell I was making the game exciting, but the excitement of the players fed into my nervousness and my brain just started to shut down. If I called for a dice roll then that meant I didn't have to think, until I was faced with the ultimate worst possible result of one of those dice rolls.
After I first started GMing, I ran a D&D game for several years, but for the life of me I can't think of anything specific I did that was bad. But from what I can remember, I can't imagine it was a very fun game and I don't understand why any of those guys played with me for as long as they did. At least in high school when I ran a game there was seemingly nobody else to play with.