Set by Black in the Queen's Gambit Declined · Exchange (Carlsbad)
With a knight on d7 instead of a bishop on e7, the d5 pawn looks loose after cxd5 exd5. Nxd5 walks into …Nxd5, and Bxd8 is met by …Bb4+.
The Elephant Trap comes from the Queen’s Gambit Declined: 1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Nbd7. Black develops the queen’s knight to d7 instead of playing …Be7, and after the exchange 5.cxd5 exd5 the d5 pawn looks loose.
It is one of the oldest and best-known traps in the Queen’s Gambit and still appears in opening books for both sides. It works because White relies on a pin that is not really there, and it has caught players at every level who grabbed the pawn on autopilot.
White grabs the d5 pawn, counting on the pin on the f6 knight.
6.Nxd5 looks like a free pawn. The d5 pawn has only the f6 knight defending it, and that knight is pinned to the queen by the g5 bishop. Most of the time a pinned piece cannot move, so White counts two attackers against a defender that cannot take back.
But the pin is only against the queen, not the king. Black takes on d5 anyway and offers the queen. If White takes it with Bxd8, …Bb4+ forces White to give the queen back on d2, and after the trades Black is a whole piece ahead.
How Black punishes 6. Nxd5:
As White, do not take on d5 in this position. Play a developing move such as 6.e3 or 6.Nf3 and keep the normal Exchange Variation plans: the pressure on d5 and the minority attack with b4 and b5 are still there later.
More generally, before you win a pawn by counting on a pin, check what the pinned piece is pinned to. A piece pinned to the queen can still move if it wins more than it loses, and here the check on b4 is what makes it work.
You play Black after 6. Nxd5. A correct move gets the scripted reply; a wrong one is taken back.
Bring in your chess.com games and see the mistakes you make in your own play.