At this point, if Black plays exf4, you literally cannot play d4, like you can play e4 in the Queen's Gambit. If you do play d4, watch out for Qh4+. Either you move your king or you play g3. If g3, then fxg3, another free pawn for black. (If hxg3, then Qxh1, so you basically just lost two pawns...) At this point, the best thing to play is Bg2, preventing g2+...gxh1=Q.
Why the King's Gambit is bad

After exf4, the engine suggests that Nf3 is the best move. Nf3?? g5!! 0-1 imo
After g5 white could just play h2h3. No threat any more.

After exf4, the engine suggests that Nf3 is the best move. Nf3?? g5!! 0-1 imo
After g5 white could just play h2h3. No threat any more.
I really hope that h3 was a typo in your comment. h4 is the King's gambit main line, which has thousands of pages of theory with millions of games played. Right now it is not popular in high level play, but it is playable. In top level play, Judit Polgar played it occasionally in the nineties, and before her Fischer and Spassky. Notably, Spassky never lost a game with the King's gambit.
Everything CoolDude wrote above is just a joke, I hope.

MelvinGarvey:
But 3. d4 (the Steinitz gambit, played a lot by the first world champ in the times when he was young and reckless) is a very dubious line. I am surprised it is attempted in the 21st century. It does not give justice to the King's gambit.

The King's Gambit is still a fascinating opening to explore. One of the reasons people write it off so quickly is because in the current era of chess, it is simply not seen as a 'solid' enough move. That's not a reason to discard it though.
With 3. Nf3 the King's Gambit is still a very considerable opening.
King's Gambit