Where do I go wrong?

your good:
rooks control files, double rooks, protect king, develope all pieces.
your bad: "a knight on the rim is dim", try not to move your knights to the edges of the board, (move 9) as you can see it only damaged your pawn structure (move 12) which ended up giving your opponent a passed pawn. that passed pawn became a queen leading to checkmate 36 moves later. For every move you make, find your opponents possible response (which included long term responses) example: "if I move my knight to a4 now, will it be a target later? " you should have a. never moved your knight to the edge or b. moved it off of the edge on your next move, or, protect it with a piece other than a pawn. Although pawns are "weak" alone. Pawns have a big impact on the game (in the future)