first game
2. Nd4? It's best to attack with several pieces in coordination instead of launching a kamikaze with a single piece.
5. g3? His queen attacked your e4 pawn on the previous move. You should defend that pawn somehow. For example, Nc3.
On move 9 you could try 9. dxe5. If your opponent recaptures the pawn with 9. ... dxe5, then the d-file is an open line pointing to his king. You can play Bg5+ and 0-0-0. Instead you went into kamikaze mode with the queen.
If this is your first game, you're not off to that bad of a start.
Here's a pointers that will improve your game greatly!
1)A rule of thumb for openings is only move each piece once. It's highly unlikely you'll win chess games with one piece attacks, the true attacker coordinates his army!
And don't feel the need to check your opponent's king everytime you can, as more often than not it doesn't help your position.