defense against queen attack second move
You need to keep track of what's being attacked and make sure it's all sufficiently defended while bringing out your pieces.
After 1.e4 e5 both e-pawns are undefended. 2.Qh5 attacks your pawn on h7 which is defended by your rook in h8, it attacks and pins your pawn on f7 which defended by your king on e8, and it attacks your pawn on e5 which is undefended.
The best move in the position is 2...Nc6 which develops a piece and defends e5. You can also try some gambit lines with 2...Nf6.