most dungeon design is a complex synthesis between ‘game-ish’ and diegetic elements, treating the adventure purely as a game, or seeing it as in inhabited world, you can make good adventures from either polarity of course and like I wouldn’t mind (or don’t think I would mind as I don’t really play computer games) if I were playing a Nintendo game, being channelled around a long and encountering a series of interconnected boutique situations, but the moment I feel even the hint of those walls close in around me in an adventure I basically shit myself with resentment.
Show the locks before the keys. Ideally, let the players interact with the locks and experience fun or interesting “failures” to communicate to them that they’ve found a lock and are in need of a key. Couple this with a relatively open area to explore where there are other things to do/find that aren’t locked. These things can, and should, contribute to their progression.