I’m not very good at building dungeons, though I should probably add that I’m also not bad. I’m alright. They take a long time, compared to preparing story elements, planning cities, and making up characters. It takes a whole lot of work to get a dungeon built, if you want it to feel customized and unique. Don’t get me wrong, it is probably the most fun I have as a DM, preparing for a session. It just takes a whole day of work or several evenings. Trap assignments, copying stats down, finding references, creating custom traps, designing passageways and rooms, filling the dungeon with residents, and then coming up with any puzzles. Treasure and stuff is usually an after-thought, since I usually just keep refreshing a random treasure generator until I find a hoard I like.
One of the easiest things for me is the entrance. Setting up a dungeon entrance depends on how the party is going to encounter it. Are they going to stumble across a random dungeon? Are they looking for it because they heard a rumor or were sent to find it? For the former, perception checks work great and all you need is some place that the party would reasonably go that not a lot of other people would. If you’ve ever played D&D, pretty much every party is constantly going places no one else would, so that’s easy. If they’re looking for it, that’s even simpler since they’ve got a general location and will be making skill checks until they succeed. After that, you just need some flavor about how they found it, what the door is, and then a hurdle for them to overcome before they can enter. Like spotting a secret door in what otherwise appears to be a simple hidden outpost that hasn’t been used in centuries or having the lookout notice that the sand dune they’re looking at isn’t shifting like the other ones.
After that, my struggles usually start. What traps are appropriate? How many are appropriate? I like undead dungeons, because you don’t really need to think about how dungeon creatures or NPCs would get around. Undead just stand around until they spot something to attack and even the intelligent ones don’t need food or air. My favorite dungeon was actually a tomb built to keep the undead inside it, and the party didn’t realize it until they’d set off or disabled all of the traps at the door to the boos room. More recent dungeons have involved intelligent creatures that need food and water and sometimes air, so I’ve had to be very careful with trap and puzzle placement. How is a gaggle of kobolds supposed to bypass a 30-foot pit trap without some way to go around? Also, how are the lizardfolk supposed to go through the puzzle-door unless they know the answer to the puzzle? Solving these problems would make it easy for the party to by-pass the actual traps and puzzles because they’ve got high perceptions and at least one of them isn’t afraid to do a little torturing if he wants some information.
There are, of course, other ways around this. Labyrinthine dungeons. They’re a pain in the ass to build and draw on a map, but they can be so incredibly rewarding. All of the creatures that live in the dungeon would know their way around and could find the easiest passageways, while the party is stuck trying to muddle their way through without running into another dead-end filled with the newly animated corpses of the last group to fall to the poisoned needle trap the party just set off. Once you’ve figured out the best way to build them (and start saving parts the party didn’t explore for future dungeons), the only real problem is drawing them out so the party has some kind of physical space to move through. Sure, there are any number of software programs that would allow this, but I prefer a more tactile experience when I can get it. Wet-erase markers, a play-mat, and one of my players as the map-maker since it makes more sense to have the players draw the map based on your descriptions rather than to do it yourself and try to guess on their sight-lines/spacial reasoning abilities.
As for filling a dungeon with creatures and NPCs… Well, that’s usually a bit easier since you’ve probably got a themed based on the location or the reason the party is there. Build a few encounters, stick them in the dungeon’s rooms, and then add a few advantages to them to reflect the fact that they’ve had time to prepare for invaders. Also, remember that just because a large creature takes up a 10-foot space doesn’t mean it can’t also squeeze through a 5-foot hallway. Dungeon Master’s Guides and/or Player’s Handbooks should have some rules on how squeezing works, so maybe sticking a large creature in a medium hallway could be a lot of fun for you! It’d be super interesting for a bunch of snakes to show up in the hallway. They’d be able to manage it fine and could maybe use their size to shove the party around as they slithering through the halls.
Just, you know, make sure to build your dungeons a few sessions in advance of when you think you’ll need them. Chances are good you’ll wind up wanting a little more time than you planned to finish building your dungeon and it is usually worth taking the time to do it right rather than rushing it. You’ll feel a lot better about it, that’s for sure.