One of my worst experiences running Pathfinder came when we were playing the Council of Thieves adventure path. The adventurers enter a pocket dimension and have to fight their way out. Except that almost all foes have damage reduction 5; that is, they take 5 less damage unless struck by special weapons (I forget which type, likely silver or cold iron).
The party didn’t have this, and had quite a lot of multiple strikers (that is, low damage on individual attacks, but many attacks). So, it was an absolute grind and not fun at all for the players.
In this case, it would have been much better if the group had been able to learn before entering the pocket dimension what sort of foes they might face and what special equipment they needed.
Also, not presuming that players understand how the system works is occasionally nice.
One of the things that made this problematic is that the players had one shot at this. There is a different dynamic at play when the players can face a challenge, retreat, do more preparations, then return and reface the challenge.
One activity that tends to be underappreciated in many Dungeons & Dragons games is research. Before going into a dungeon, talking to people and reading accounts of what people have found there. Early D&D adventures occasionally had a table of rumours (some true, some false, some partially true) that players could learn before descending into the depths. This has continued, in a sporadic fashion, since, but is mostly out of favour. (Curse of Strahd does allow you to talk to the folk of the land and learn things!)
Of course, even if players pursue this activity, the DM needs to give them useful information! I know, because I suffer from this flaw myself, that DMs are often too secretive about the dangers that lurk in the adventure. Now, obviously, there are times when you want the players to go forth into an utterly unknown land, but all the time? Let the players have some idea of what is coming. Perhaps not everything, but enough so that, if they take the time to prepare, they can prepare the right spells and purchase the right equipment.
And then there are times where you put clues in the dungeon that the players can pick up on. A lot of burnt bodies indicates there may be a fire creature ahead. Do we have ice magic? Petrified adventures. Oh, can we deal with a medusa?
If you have a dungeon that imprisons a nasty creature, perhaps murals and carvings that depict the creature and some of its abilities? Enough so the players have a chance to realise if they’re up to the challenge or not.
You never need to reveal everything, but especially when the players are in a situation where retreating isn’t going to be an option, a little knowledge makes a big difference.
Council of Thieves had a lot of balance issues like this, apparently. My group suffered a TPK in the first adventure, Bastards of Erebus, when we were caught in darkness by foes with darkvision (which none of us had); that 50% miss chance doomed us.
(Every one of the replacement PCs had darkvision.) 🙂