Talk about traps is a little overdone. You hear people tell you not to take certain spells because they're suboptimal or only work for very specific character types and play styles.
This is not that kind of post.
The following spells are spells that no one in their right mind should take. They are either non-functional, barely functional, or significantly worse than other spells of the same spell level (and sometimes lower).
So far, I've only found three of them: create bonfire, distort value, and true strike. If you know of any others (or would like to contest my analysis of create bonfire or distort value; true strike's suckitude is noteworthy enough to have a video about it [but see the description below]), let me know.
Level 0 (Cantrips)
Create Bonfire (Xanathar's Guide to Everything, pg. 152)
What It Does: Per the name, you fill a square (well, 5 ft. cube) within 60 ft. of you with fire. Anything in that space when the spell is cast or which moves through the space (on the first time in a turn) or which ends its turn in the space takes 1d8 points of damage (+1d8 at 5th, 11th, and 17th levels) on a failed Dex save. Any flammable materials that are in or enter the space ignite.
Why It Sucks: There are several reasons to avoid this spell. First, it's a Concentration spell; there are so many other spells that require Concentration that are better, so don't limit yourself to one that sucks. Second, the obstacle it places is the sort of extremely obvious danger that opponents would be careful to avoid regardless of Intelligence; the tactics required to make it a viable trap are not feasible. It does not function well as a utility spell, either, as it lasts only a minute and, as a Sorcerer, you have access to a plethora of spells that can ignite material if you really need to start a fire; indeed, with fire bolt and a dry enough field, you can create a wall of fire just using a cantrip. Speaking of fire bolt, finally, every other fire cantrip is better in nearly every regard in most situations.
True Strike (Player's Handbook, pg. 284)
What It Does: Gives you advantage on your next attack against a specified target if you make the attack before the end of the next round.
Why It Sucks: First, this is a Concentration spell. Second, you spend two rounds to get two rolls to make one attack. You are better off just attacking twice. Finally, you don't get advantage on your next attack, just your next attack against a specific target.
Why It's Like This: To the best of my current understanding, true strike originated in 3.0. In said edition, it was a 1st-level spell that granted +20 on the caster's next attack roll (regardless of target) and allowed you to ignore the miss chance from concealment; the duration was the same, though. This was balanced when used as intended (after all, there are probably better things to spend a spell slot on), but provided a corner case that imbalanced the magic item creation rules enough that the DMG itself had to include a note about it and similar spells. (It would also provide one of several reasons why the OG Warlock couldn't simply select any Sorcerer/Wizard spell to cast at-will.) It was significantly nerfed to conform to the rules of 5e, but the eventual suckitude was probably unintentional (and likely due to lack of playtesting).
What Makes It Semi-Useful: This video keeps saying it's "very powerful" when it's not, but it does come up with a case where it might be useful: when targeting an object, such as in an archery contest. That might be fair; the original use of the spell was not meant as a constant-use buff, but a panic button in case you absolutely had to hit something and that use squares with things like archery contests. I wouldn't say this is reason enough to take the spell, though, unless you're using alternate rules for cantrips and could prepare them as a Wizard prepares spells.
1st Level
Distort Value (Acquisitions, Inc., pg. 75)
What It Does: Doubles or halves the perceived value of an item.
Why It Sucks: The item in question has to fit inside a 1 ft. cube, drastically limiting the utility of this spell. You can get around this by using a higher-level spell slot, but the increase is additive and the value of spell slots increases exponentially. For example, if you use a 9th-level spell slot, you can affect an object that fits into a 9 x 9 x 9 ft. cube...or you could reshape the fabric of the universe such that for that single transaction you can get a thousand times more than the object is worth (or have it written off as worthless). Given that the spell is balancing itself against disguise self (another glamer of the same level), it should be capable of doing far more than merely distorting value.
What Would Make It Better: This would probably be fine as a cantrip.
In an age without microwaves or lightbulbs, fire is an important thing to have. Most spellcasters have Prestidigitation to get fires going without having to rely on a tinderbox (if you ever need to make a wizard look dumb, ask ‘em to use a flint and steel), but Druids need to keep warm and Artificers need to light their forges.
Create Bonfire has its mundane uses, but a five-foot-tall, five-foot-wide fire is usually pretty overkill, even if it is relatively cool (this spell deals 1d8 damage on a failed save, while falling in a mundane fire pit deals 2d10 damage). Therefore, when people first learn this spell, they typically learn to make the fire smaller immediately after. Just big enough to warm your porridge or get a kiln going.
It’s a versatile tool, but few people become a warlock or a wizard just to start massive fires -- although that does happen from time to time. But it still takes a great deal of practice with this cantrip to ignite certain materials; for example, wet driftwood isn’t exactly “flammable” but some mages are able to get a fire going with it.
Unlike other spells, cantrips can be practiced all day long so its hard to stop getting better with ‘em.