I have been a GM for 13 years and my primary motive is hardcore roleplaying. Killing stuff and murdering you way through problems is not our style. We have solved major parts of campaigns with gold, the right way to talk and the real deals.
But of course. Combats and dungeons full of evil to defeat. They are there too. To explain how I design my dungeons, I will give you an example of one I have made and how.
I once GM'ed a campaign where the players where to find a secret and evil cult. They have followed their trails for long while other plots have crossed over and they know nothing about, who their next enemy is.
Their trails leads them to a swampy river and they sail it with 3 smalls boats in silence through the darkness. And then their trail learns them down a path with very difficult paths. And under big shattered rocks covered in moss and dead trees, they find a little tunnel that they sail through. They sail for some time and they are suddenly in a big open space. The water is still swampy and in the darkness around 400 feet away, stands the gigantic front of an underground dwarven fortress.
When you design something it has a history. To know it's present status, you need to know its past. This is essential to everything you make as a GM. NPC's, vilians, taverns ex.-
So this is a dwarven fortress. The first "enemies" they meet is ghosts and undeads of dwarfs and swampy animals. So they think this is a haunted place with completely random animals using the old fortress as a home. The enemies later on are undead orcs, constructs and magical traps. And first at the end they meet the cultists which is the plots real enemy. This point is great. If you make a dungeon with only one kind of enemies, it might turn into a boring dungeon with no history. It's just room after room after room of goblins.
When I make dungeons it takes long time. I don't sit down and make it from start to end. It is in small steps and I read alot to get inspiration, so I end up full of inspiration to make it perfect, nothing else is acceptable.
This dungeon is at this moment the home of a cult and random animals. The rest in there is simply their spells used to protect them. This is a great point! Are there enemies in YOUR dungeon? That could turn into friends of the players? In this dungeon there could be a barricaded corridor with alive dwarfs. Just to make an example. Are some of the bad guys guards loyal and would die for their goal? Or are they hired hands that works for the highest bidder? Or in this case - spells. The protection of the dungeon should never be alive things only. Include two very important things - environment and traps. In my dungeon there had been great wars beetween orcs and dwarves, which had led parts of the dungeon is great collapse with big environmentally threats.
At this point I have a dwarf fortress in my mind, not complete at all, I dont know many rooms yet. But I think. If I where a cult of evil bad guys, and I take a dwarven fortress as a headquater. What would I do with it? They planned to stay long. So a big religious temple is to be made. Where inside would they build this? After that, where would they sleep and work? What rooms would they use for that? And that way I went backwards and build the fortress from a point of - where are the cultist doin their stuff? When that is complete I have alot of rooms, build by the dwarves and overtaken by the cultists. Then there are alot of rooms left.
What else has happened? THE ORCS! The cult has not used the collapsed parts. And if the orcs came from the outside? Where were the battles fought? When I thought all theese thinks I had a lot of rooms comming into my mind.
Long corridors with big battles. Small maze like rooms with big doors barricaed and the fights moving from room to room. And in a matter of no time I have designed two big parts of the dungeon. 1. The cultists current headquaters. 2 a big part beetween the headquaters and the entrance - which is..... THE DUNGEON TO EXPLORE AND FIGHT THROUGH!
At this point I began to refine details.
1. Where do the animals live and what kind of encounter will they be? They was very territorial and defended their new home to the death.
2. The cultists, what do the eat and where do they put their waste and trash?
3. Is there a diffrence in the rooms? Is there architectural difference? Smells from workplace/tombs/corridor that has been empty and not used for generations/often used - include dust and clues of "this part is in use".. Could be a dropped cultist ring or animal poop.. Make your dungeon trustworthy and some parts to be alive when the party enters it. If they enter a stronghold and all the bad guys are designed in a "we just wait for you to come and kill us"-way it is boring and there is no "soul" in the dungeon.
4. Refine details of the dwarf rooms. Old hidden weapons, tombs, treasures, workplaces, beds.
5. The outside. Places from inside where the dwarves could shoot out and have scouts.
After this, all the solid parts of the dungeon is complete. Now to the events. What will happend when and where?
What status will the cultist be in, when there is combat here and here. If they spot the party and knows they are under siege - what do they do?
If they get sneaked out one by one and the party uses disguise and tricks to get in - what are the cultist doin then? My players was level 13 so they had many abilities and they used spells to sneak in and scry. They overhead a big ritual, meetings with the cultists and other cultist stuff.
They spyed on the cultist for 2 weeks before they slaughtered them all one by one in a big tactical plot.
But what about your dungeon? And ofc, your players? Will they charge in and get spotted and just fight from room to room - draw back and rest, and come back the next day to carry on?
I hope this was a help.