1.d4 e6 2.c4 c5 3.d5 exd5 4.cxd5 Nf6 5.Nc3 a6 6.e4 d6 7.Bg5 Be7 8.Nf3 h6 9.Bh4 Qa5 10.Be2 {This is wrong.} Nxe4 11.Qc2 Bxh4 12.Nxh4 {QxN must be better I think. But I didn't think then.} Nf6 13.O-O Nbd7 14.Rfe1 O-O 15.Rad1 b5 16.a3 Bb7 17.Nf5 Rfe8 18.Nxd6 Reb8 {Now what?} 19.Qf5 {Could I have sacrificed the knight on f7? Or maybe there something else?} Nb6 20.Nce4 {Again there was a choice, and I don't know if this was best.} Nxe4 21.Qxf7+ Kh8 22.Nxb7 {Bd3? Something with the queen? A day will come I will make a sacrifice without calculating it all the way through and knowing it's OK.} Rxb7 23.Qxb Rd8 24.Bf3 Rxd5 25.Qb8+ Kh7 26.Bxe4+ g6 27.Qb7+ Rd7 28.Rxd7+ Nxd7 29.Qxd7+ Kh8 30.Qe8+ Kg7 31.Qe5+ Kf7 32.Bd5+ Kf8 33.Qe8+ Kg7 34.Re7+ Kf6 35.Qf7+ Kg5 36.f4+ Kh5 37.Re5+ Kh4 38.g3+ Kh3 39.Bg2+ Kg4 40.Qxg6#
1.d4 e6 2.c4 c5 3.d5 exd5 4.cxd5 Nf6 5.Nc3 a6 6.e4 d6 7.Bg5 Be7 8.Nf3 h6 9.Bh4 Qa5 10.Be2 {This is wrong.} Nxe4 11.Qc2 Bxh4 12.Nxh4 {QxN must be better I think. But I didn't think then.} Nf6 13.O-O Nbd7 14.Rfe1 O-O 15.Rad1 b5 16.a3 Bb7 17.Nf5 Rfe8 18.Nxd6 Reb8 {Now what?} 19.Qf5 {Could I have sacrificed the knight on f7? Or maybe there something else?} Nb6 20.Nce4 {Again there was a choice, and I don't know if this was best.} Nxe4 21.Qxf7+ Kh8 22.Nxb7 {Bd3? Something with the queen? A day will come I will make a sacrifice without calculating it all the way through and knowing it's OK.} Rxb7 23.Qxb7 Rd8 24.Bf3 Rxd5 25.Qb8+ Kh7 26.Bxe4+ g6 27.Qb7+ Rd7 28.Rxd7+ Nxd7 29.Qxd7+ Kh8 30.Qe8+ Kg7 31.Qe5+ Kf7 32.Bd5+ Kf8 33.Qe8+ Kg7 34.Re7+ Kf6 35.Qf7+ Kg5 36.f4+ Kh5 37.Re5+ Kh4 38.g3+ Kh3 39.Bg2+ Kg4 40.Qxg6#
I noticed you missed a bit of text at move 23, which is why the PGN was not working.