Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nf6/4. Ng5/4...Bc5/5. d4

5. d4!?
Rather than capturing the undefended f-pawn, White plays it safe and attacks the bishop while preventing the idea of Bxf2+.

Moving away the bishop is a mistake because after Nxf7, White captures a free rook and Black has no counterplay without the bishop sacrifice.

Capturing the d-pawn with the pawn or knight will similarly prevent the bishop sacrifice.

Another mistake is if Black captures with the bishop (5...Bxd4) and goes for the sacrifice anyway (6. Nxf7 Bxf2+). The difference between this position and if 5. d4 Bxd4 was never played is that White's queen and dark-squared bishop can protect key squares from Black's fierce counterattack.

Therefore, Black's only sensible move here is 5...d5, stopping a capture on f7.