If pawn takes pawn after that move, then your knight is screwed. You can't move the knight because if you do, bishop will take your queen
Why this opening movement is an error?

Wait. I think I misunderstood your question. What do you mean by h4? In the pic you sent, white didn't move his h pawn. A
Hi
As I am just learning I don't really care about losing games. Actually I prefer, I learn at this moment more by losing and analyzing the game.
But sometimes this is frustrating, for example this black (my side) movement (5. h4 d5) is mark as "error" and I cant understand why. Maybe there are better moves, but why an error?