Scotch gambit
Beating the Scotch Gambit.
An early d5 by Black is the key.
Knowing that "an early d5 is the key" means nothing if all you know about it is this move.
Of course 5.e5! is the critical move, but anyway, after 5.Ng5?! d5! 6.exd5 the only good move is 6...Qe7+!
Your 6...Nxd5? transposes to a bad line of the Lolli attack, and practically loses the game after 7.0-0 (white has a lot of deadly threats, including Re1+ and Nxf7).