This isn't about mechanics, this is about style.
Make it Obvious
If you pit traps hidden unless everyone has a 10' pole, then everyone will carry a 10' pole all the time. If you make door traps undetectable unless folks succeed at a roll, then every fucking dungeon door is searched for traps. "But that makes sense" is fine if we were running some sort of a simulation, but it is FUCKING BORING in real life gaming. I used to do it that way, then one day I came to my senses.
Make traps obvious. Or their effects obvious. Either show the players the trap or a big fucking clue. Got a chest covered with contact poison? Then tell them it is covered with something or throw some dead bodies (or rats) or whatever around the thing. Give the players something to latch on to. If they ignore this, it is at throw own peril.
"There are a few human skulls, cracked with age, littering the hallway." If they focus the light and look down the hall "you see some armor-clad skeletal bodies, headless, about 30' away". There is clearly a trap here - something that decapitates motherfuckers.
Don't Write a Solution
Let the players come up with a solution. as a good GM, you need to determine if that would work, or how it would work. Just write the situation - the hallway has a bunch of blades that will chop of your head. Very Indiana Jones 3.
Not writing a solution seems to imply that you don't need to write how it is triggered. Not true. But writing a trigger may imply a solution, but doesn't dictate there is only 1 solution.
- Player: I'm going to run and dodge my way through'
- GM: Give me a DEX Check. But failure isn't damage ... it is decapitation
- Player: serpentine pattern and Naruto style ... LET'S GOOOOOO!
- Player: I'm going to crawl slowly along the floor feeling for stones that may trigger these stupid blades
- GM: the blade are not stupid they are awesome. it will take you 2d6+4 minutes to crawl that carefully.
- Player: ok ... i'm going to use my chalk to mark stuff too
- GM: great - you do it* and everyone else it only takes 1d6+2 minutes because of your marks
* You do it could and should likely be expanded into some tense role playing for fun, but was too long to write out for my example.
Make them Want to Mess With It
A trap just being a trap for no reason is as boring and lame as a trap that isn't obvious in some manner. Players should have a reason to choose to mess with a trap. Choose is the important word here. Again. Choose. If the trap lies between point and and point B and the characters need to get to point B then it isn't really a choice to interact with the trap. Of course need is a bit sloppy as well. They probably want to, which is different than need to, so want allows for a choice (even if a bit thin).
A trap sprung on completely unsuspecting players means they didn't choose to interact with the danger and makes it feel like a gotcha. If they ignored all the obvious signs, that is their own dumb fault. But as the GM, maybe you didn't do a good enough job of telegraphing. Make a note and figure it out later. Don't beat yourself up. This is just a game after all.
- Why even go through that passage? Because that door at the end of the hallway has the mark that we've seen on other treasure vault rooms.
- The gemstone on the pedestal surrounded by dried blood and looks really valuable. Are the walls covered in blood as well - like an explosion? I really want that topaz...
- So the statues turn to look at us as we pass by and they all have gold coins for eyes. Like real gold I think (in a game where copper groats are the common currency this is some serious loot). But they are looking at us. Actively. I want those coins! But I don't want to die! Coins ... LOOOT! I get out my prying dagger. Watch my back, wizard! (The wizard steps out of the room because 'fuck this!')
Bonus Fun: Monster as Trap
I've done this a bunch and it is always fun. A trap is an obstacle, something to overcome - a challenge if you will. So are monsters. So why not place a monster that will DESTROY the party - like serious TPK potential - but put it in a state that the characters can avoid it ... but if they mess with it something cool happens. My favorite - sleeping dragon.
Everyone knows that a giant-ass sleeping dragon that is cradling a pile of coins and gems and whatnot. If they trigger the trap (wake the dragon) there will be hell to pay. So sneak by it and avoid the danger ... or figure out a way to get that loot. Of maybe the dragon is blocking an archway that leads to a cool sublevel of the dungeon they heard has a fountain of Beefy Strength or something.
Replace 'dragon' with whatever is awesome for the adventure: Giants, Lovecraftian horrors, infinite amount of huge hunting spiders, hoard of fear burrowing goblins - whatever floats your boat. The idea is to make it a clearly bad idea if they are 'triggered'.
Traps Kill and Maim!
Traps that just do some damage are boring. Traps about always be seriously brutal - kill them fools! Rip off legs and destroy armor. If you make traps just whittle away at hit points they are annoyance and become less interesting. Drop a ceiling on a PC (or hireling if the players are wise) and they'll get the idea. This doesn't mean character's can't survive, but why do 1d6 damage when you can do 10d6 damage? Make that shit BRUTAL.
Traps that Warn or Detain
Fine - I acknowledge that these exist, but they are rarely that interesting. You fell in a pit! Other adventurer's help you out of the pit. But if you take these situations - fall in a pit, drop a net, and so on - then these should warn someone/something else ... and start a race against time! Fall in a pit and a bell rings and a bunch of kobolds with jackal skulls for heads wielding javelins dripping poison come running in 2d10 seconds (like 1 or 2 rounds) from the secret room next door - that is a trap with a pit as part of it.
No Content? Just Advice?
I was going to write up a list of traps or a trap generator, but they are already everywhere and I don't have anything that is so unique as to change your world. So roll something on whatever table, grab results from whatever generator, then make them MORE.
For some examples I hit up https://www.kassoon.com/dnd/trap-generator/ and used what was generated and made it MORE. The traps presented are just traps, so I'm not shitting on that site (it is a really nice generator), but everything is very mechanical. Basically the opposite style of what I'm doing.
The Web Trap
Original Summary: magic makes webs fill an area and make a really easy DEX Save to avoid or STR to break out.
MORE: What looks like charred ropes hang limply in an area that itself has charred walls. Step in giant spider webs get sprayed all over you (automatic). If anything struggles, they get set on fire! 2 STR Checks to completely escape back the way you came or 4 to get to the far side. 3d6 damage every check (assuming that is rounds or something). ON the far side ... a ruby made of living flame held in the many legs of the Spider Queen Leth.
MORE: A series of concentric bear traps can be seen poking through the floor - each one larger than the last, the farthest one clearly closing at about 8' high. Pedestal with Juice of Everlasting Cool - i'm down the pressure plate thing. trigger the plate and BLAM - crushed and pierced to death by those bear traps. The first one does 1d6 damage, then each one after that 1d6 MORE damage than the last - total of 10 of them, each one triggering 1 second later. snap Snap SNAP! And it will destroy the fragile Juice Bottle - because if i can't have it no one can! Better ruined than in the hands of thieves ...
That is all for now. please do some gaming! If you pimp out some traps or do some cool traps in this style, let me know! Time to go clean up the garage and get ready for my Friday night game. Maybe I'll remember to eat lunch today at a normal time.