As mentione,d didn’t happen. He did put a locking charm on the tomb door, but that was simply incapable of holding back the power fo the Balrog. The charm worked - but the Balrog’s magic was too much and the door itself simply exploded from the strain.
No. He could do quite impressive feats of magic when necessary, but only the bare minimum and nothing even remotely like a DnD wizard. DnD spellcasters are more like Artillery Pieces on legs than anything human*. Others mentioned the specifics, but note that he was able to shatter a stone bridge strong enough to support the Balrog, light the camp on fire, counter the Nazgul’s city-wide aura of despair, remove most of Saruman’s power with a word, and when he came back may have been immune to any mortal weapon, and probably few immortal ones as well. It’s not flashy - but that doesn’t mean it’s weak.
*This is not a joke. The Wizard in DnD was based around rules for WW2 artillery. They jsut gave it a fantasy gloss and later, other kinds of spells.
The maiar, like Gandalf and the Balrog (and Sauron, originally) are not nearly as strong as the Valar (Pagan Gods, more or less). And they are merely creations of God Himself. The good guys are willing to, as Tolkein put it, sing the Song of Illuvatar. Because of this, there are limits to what they can do: they have to act in ways which don’t break the Song.
In other words, they cannot dominate. They can rule only when they have lawful, accepted authority. They can’t tear up the land willy-nilly. They don’t kill simply because it’s convenient, even if the consequences of not doing so might be terrible.
The bad guys can do all that, but they’ve lost so much it can’t even be conceived of. Their very place in the universe is lost to them. They can’t heal anything. They can’t lead - only terrorize. They can only be utterly ruthless overlords, or slaves. Sauron’s magic is only about control. He can build indestructable fortress - but the only thing it’s good for is domination. He can give humans immortality - at the price of turning them into miserable slaves with no will of their own. Even the Witch-King’s protection worked by hurting people trying to strike at him and destroying their weapons.
Even Morgoth, who was powerful enough to reshape the entire plane of existence (it wasn’t even a planet at first!), could never do anything we would consider “constructive”. Even culture or the arts were pretty much beyond him. Sure, it fits the needs of the plot. Obsiously, it’s a story. But it also makes internal sense when you consider what Gandalf was, and what Sauron was.
No, because the last time that happened the entire world was kicked in the gonads so hard it never entirely recovered. But note that Saruman also failed to use lots of big flashy destruction spells. He was able to call down a storm hundreds of miles away (amplifying and controlling the locally-appropriate weather) and he beguiled and persuaded those around him (one wonders if Grima did not start out as a bad man…)
That wasn’t the point. Middle Earth wasn’t saved by mighty, obvious powers. It was saved by the fact that its people - Elves, Dwarves, Men, Ents and even little Hobbits - were willing to stand up to evil and stop it. Gandalf’s mission was to make this possible and limit the damage. It was not his mission to make the choice or carry it out.
Besides, they had God Himself backing them up. It’s not like Sauron had the power advantage here.