Dungeon Keeper 1-2
From Bullfrog before EA moved them to Harry Potter games then shut them down.
Its a really fun RTS/Management game where you are the evil dungeon keeper and you must defeat the goody goody heroes and other keepers aswell.
The games take place underground where you build rooms to attract different monsters, mine gold to pay them, you feed them and train them and some even research spells for you to use.
Levels task you with destroying enemy keepers or the goodies or defending against waves of heroes coming to destroy you.
The first game came out in 1998 and the second in 2000.
Here are links to the gog store pages as these games are currently on sale.
Dungeon Keeper 1 https://www.gog.com/game/dungeon_keeper
Dungeon Keeper 2 https://www.gog.com/game/dungeon_keeper_2
If you don't mind any older games, take a look at Dungeon Keeper II! It's a game where you have to design and build your own dungeon, with monsters and everything. You can pit them against each other, or against 'good' heroes (as you are the villain in the game). It's more similar to an RTS rather than a shooter/adventure game but you might like it! :-)
Nox, Tyrian, and Dungeon Keeper 2 all stay installed on my computer because they're all so much fun.
okay so im home now so i can write better, basically the games you are looking for
Dungeon Keeper 1 (gog link) and 2 (gog link) are exactly what you are looking for but they are old, but they feature a dungeon building where you get beasts and you fight against heroes.
And Fight for the Overworld which is basically a remake of the dungeon keeper games as they are extremely similar.
edit: I should mention while those are the type youre looking for they are not quite brick by brick building, its more of a building areas and such, but it is quite in debth.
I haven't played Undermaster but I have looked into it once before and what I heard was not good. Pretty much all of the games core features that you would expect with a DK game are time gated to such extremes that paying real money to bypass them or reduce them for a period of time is pretty much required. I'm pretty sure DK themselves have a mobile version of the game that operates very much the same. Do yourself a favour and buy DK2, it's the best on the series.
Dungeon Keeper 2
While there's always forwards and contemporaries don't forget the ones in the past are still just as genuine:
DK2 is on GOG for $6 ($10 if you buy the package with DK1). I've found that it runs very well through GOG Galaxy on Windows 10.
DK1 runs well also, but its aspect ratio creates black bars on the sides of the screen.
Edit to fix the link
If you've never run across it before, you might want to check out Dungeon Keeper 2. I honestly like the first one more, but a lot of the community prefers the second one, and it's prettier, considering they're both really old.