Untouched, that is a very good wall. There are no open lines into g1, and no squares nearby for an enemy piece to settle on.
Now the h-pawn has gone to h4, which is a move people play without thinking twice about it.
And h2 is empty for good. No white pawn will ever stand there again, so nothing of White's can cover it with a pawn.
A gap in the shield does two things at once. It opens a line towards the king, and it leaves a square a piece can sit on.
And neither of them can be undone, because a pawn cannot come back to a square it has left.
Here the whole thing has gone. Three empty squares in front of the king, and one lonely pawn on the other side of the board.
A king in that state does not need to be attacked cleverly. Almost anything works.
So the check takes a second. Look at the three squares in front of your king, and count the empty ones.
After castling, the king on g1 is protected by exactly three things. The pawns on f2, g2 and h2.