There are some play-styles of D&D in which the spectre of player-character death is considered a feature of the game rather than a bug. For my own reasons (which aren't the point of the question), I see them as a feature especially in exploration-focused games (e.g., sandboxes, old-school dungeon-crawling) where there are lots of ways for players to arm themselves with enough information to make informed decisions about the dangers they're willing to tackle.
Even with players that play strategically, seeking that intel and using it to pick their battles strategically, it is still on the DM's shoulders to provide good clues and tell-tales during play. How well the DM does this will significantly impact the players' ability to make informed decisions on where to go, how to prepare, what to fight, and what to avoid. If the players don't catch the clues, it should be because they weren't paying attention or didn't put 2 and 2 together, not because the DM's descriptions suck.
What techniques can the DM use to effectively telegraph to the players the existence and/or nature of the dangers they face?
These assumptions are inherent in the question:
- The players are already playing strategically, and don't need to be "trained" in this play-style.
- Senseless, random PC death is a real possibility, not just threat to set the tone of the game or generate fearfulness in the players.
- Characters almost always die when players put them in dangerous situations they're not prepared to deal with.
- Characters might live when players are observant, know what dangers to expect, are well-prepared, and don't take on dangers that are beyond their ability—and even then, the dice have to go in their favour. Knowledge is the edge they need to bend the odds in their favour.
- The players don't necessarily have access to stat blocks or other, out-of-game information on in-game dangers.
- Players are relying on the DM's descriptions to understand the world, including its dangers and rewards.
(This isn't an invitation to argue whether an exploration, frequent-PC-death play-style is good or not. That's just background to the question.)
Related: How can I make my PCs flee?