One of the things I did as a younger GM was make solutions to the obstacles I was putting in front of my PCs. As I grew in experience I made multiple solutions. Both the singular solution and the multiple solutions suffered from the same two core problems: 1) they were more obvious to me than to anyone else because I knew everything about the puzzle as I made it. 2) They were more obvious to me because they came from how I think and how /I/ would approach the puzzle.
When it comes to running a game you can't count on either #1 or #2 not being a problem. Quite the opposite, your players won't know everything about a puzzle, and they almost definitely will not approach it the same way you would because not only do they not have all the information...they aren't you.
In my more current games I tend to not design a solution at all - with one exception I'll get into below. Instead I make the obstacle, and I ascertain that the obstacle is actually surmountable. Then when I present it to my players, I wait for them to come up with a solution that should work and we go with that.
This doesn't mean that I just go with the first solution, or that they are definitely set to get out. But if they come up with a solution that sounds cool, sounds reasonable, or involves a significant sacrifice to get out I'm able to go with it and reward them for it. If they don't approach the puzzle in a reasonable way, or what they say sounds like it wouldn't work, than it doesn't go forward.
Why Do I Do This?
The reason I do this is simple. When you make a solution to a problem it is then easy to discount all other solutions. The made solution becomes the only way to solve the problem, and no other idea will be entertained because you have a solution in mind. This is a huge problem when you combine the #1 and #2 problems I mentioned above. Your players don't have all the information, and they probably don't think exactly like you, so the trail of clues you think is obvious might not even register as relevant data for them.
However, by making sure the problem is surmountable/beatable, you're not married to those ideas. The obstacle has weaknesses. Those weaknesses can be exploited. Dice rolls can be used to point PCs at those weaknesses.
Specially Built Traps
This also doesn't mean that a specially built trap doesn't protect against certain approaches. If the PCs have a reputation of punching through walls, it makes sense a trap built for them is going to be designed so you can't just punch through it. Same with a trap made for a known-teleporter could have some means of preventing teleportation as part of the obstacle. There is a difference between denying individual common solutions, and making a specific solution for a problem.
The exception to this approach comes under a specific situation: what does the person who made the trap do if they have to come through here? This is a good one to have for dungeons and bases. Those death traps to stop the PCs, how do the people who belong there get through without being eviscerated by it?
This doesn't have to be an actual solution to the trap. For example, in a dungeon I built all the super dangerous traps were around corners that led to dead ends. Anyone who belonged in the base knew to not go around those corners, and had no reason to go around those corners. Intruders though trying to find their way around the base just saw that the corridor continued another 20' then took a sharp left before extending another 60-120 feet of bare walls.
It is also possible in a magical or more technological setting that the people who belong have some kind of device that disables traps around them. This is something the PCs can use to their advantage in a number of ways. Or it could just be that the monsters/guards know where not to step to trigger traps - which also means observing them can be used to get around traps.
No one wants to be killed by their own death trap though. So there's going to be some way to avoid it...even if it is just "don't go through that door. Ever."