Not being a D&D player, but I've talked with some, there are a few that I've heard over the years.

There was a panel at Westercon back in the 80s where Larry Niven talked about some of his DM-tormenting ideas. (I went to the panel because Larry Niven was on it; didn't have much interest in D&D as such.)

Say your magic user has a "change size of object" spell. Your archer fires an arrow and in flight, the magic user changes the arrow's size.

What are the conservation laws that govern this? Does the arrow continue to move at the same speed? Does it keep the same mass? (Not a very useful shrink/expand spell; they're rarely described as working that way.) Keep the same momentum? He had a whole list of massive-damage things that could be done with the arrow.

A DMing friend said if someone had tried these stunts on him, he'd have gotten struck by lightning. Certainly, it's not "in character" for a medieval fantasy wizard type to come up with these ideas.

A couple DM ones that I particularly liked were the Paladin Trap -- a twenty ton granite slab magically stuck to the roof of the cave. No trigger to drop it, other than waiting for a paladin to come charging through the cave waving his Holy Avenging Sword to dispel the magic.

But my all-time favorite was the party comes to a room divided by a transparent wall. Detect magic -- none. Detect poison on the other side of the room, no poison. Party wants to get to the other side of the room, and there's nothing on the other side of the wall, so it should be safe to break it, right?

Well, it's true, there is nothing on the other side of the wall. Nothing as in very hard vacuum.