How did I lose this game? I feel that I played excellently.


There are some moves that don't seem to have much purpose to them, for example what is the point of 7.Bc4
You go a pawn down and then insist on trading Queens, 13.Rd1 is one of many better moves there. Then your strategy seems to be trading everything off. The endgame could have been drawn with perfect play despite being down a pawn but any inaccuracy in the endgame can be fatal especially when you are down a pawn. 46.Bd5? is one move that you could say blew it, you gave him a passed pawn and had to go down a piece to stop it promoting.

There are some moves that don't seem to have much purpose to them, for example what is the point of 7.Bc4
You go a pawn down and then insist on trading Queens, 13.Rd1 is one of many better moves there. Then your strategy seems to be trading everything off. The endgame could have been drawn with perfect play despite being down a pawn but any inaccuracy in the endgame can be fatal especially when you are down a pawn. 46.Bd5? is one move that you could say blew it, you gave him a passed pawn and had to go down a piece to stop it promoting.
7.Bc4 is because d4 was no longer protected, after I lost it the knight and the bishop were forked, so I had no choice but to swap Queens. In the endgame I tried to sieze the empty file, and then I swapped rooks when I saw that doing so would make white's king retreat to the back, then I tried to advance my own king and lost. I really don't know what I could have done differently here.

No idea if this is right or not. In seconds, I just clicked on the middle of the notation and started clicking through moves. Clicked barely a few.... Opposite colored bishops, you created tension on the King's side with e5 then e4, then you played b6 instead of Kb6... I literally didn't look at 8 moves here and without seeing the engine's opinion, I say those were no good. I may be wrong.

Watch this entire playlist.
https://www.youtube.com/playlist?list=PLT1F2nOxLHOfQI_hFiDnnWj4lb5KsviJ_

7.Bc4 is because d4 was no longer protected
If the idea was to protect your d4 pawn with the Queen why did you force a trade that would either mess up your pawn structure or make your Queen move and leave your pawn hanging? Castling would have been much better than 8.h3?
The Queen trade was not forced because you had counterplay. After 13.Bd2 Qxc4?! Ne4! you create two threats, Bxg7 and Nd6+ and black cannot defend both.
8 h3? loses time. Bg4 is his bad bishop on the color of his pawns. Bb4 is his good bishop, not on the color of his pawns. Kick the good bishop, not the bad bishop. 8 a3
13 Qd3?? spoils your win. 13 Rd1 kicks his queen.
20 Nxf6+?? spoils your win. 20 Ne7+ and 21 Rxb2 wins a piece.
45 Kc6? misses the draw 45 a5.
47 Kb7? again misses the draw 47 a5.

7. Bc4. No need to defend d4 because of Qxb7. Whenever your counterattack includes a graver threat, continue the offense instead of stepping on the defense.
Then later when necessary, you fail to defend the same pawn. These center pawns are pivotal throughout the game - you have to keep guarding them. Entire grandmaster battles can revolve around the control of a single center pawn. There's a famous one between Kasparov and Karpov.
17. Rab1. Useless move. It's far better to centralize rooks at this stage. You lower-rated guys are stepping on the brakes all the time - you need to learn to go full on into attack mode! Games that peter out into drawish positions like this are often decided by who gets to occupy the seventh rank first.
48. Bxf3. Bc4 is far better because it gains you tempi. You have to calculate your resources with every move, including tempi, especially in the endgame grind!
50. Kb7. What's the point of this move? What is the king's mission there? At least Ka6 has a point. Completely lost.
Now 52. Ka6 - it's too late by now. That's a surefire recipe for ridicule. Because they see the best move, and all you're left to do is catch up with the opponent's mind. Again, at least Kc6 has a point.
You hanged your d pawn several times (technically it was either ruining the kingside or losing the d pawn). You eventually lost it (because you didn't want to ruin the kingside by playing gxf3), you exchanged queens while being down a pawn and you entered a pawn down endgame. There is not much to explain. Bc4 I don't understand, why not Be3 instead. Be3 guards the d pawn, it develops another piece.

Seriously, the engine says the following:
You have a slight advantage through most of the opening. Bc4 is weak, Bf4 is better. The d pawn isn't really hanging because his b pawn is hanging too.
13.Qd3 dissolves your advantage and black then has a slight edge.
20.Nxf6+ is wrong - 20.Ne7+ wins back the pawn with advantage.
The endgame was an opposite color bishop draw until 45.Kc6, after which black is winning.

I think you did play excellently, until the ending. I didn't run this through an engine, but it looks like you lost a pawn in the opening, defended well, and traded down into a bishops of opposite color endgame a pawn down. Typically opposite bishops are easiest to draw among minor piece endings. But then, around move 37, you start making moves that let the other king in. You needed to get your king farther forward and blockade. For example, when he plays 40. ...Ke6, I think you need to play Kd3, moving your king towards your own bishop. You can never give up control of that f3 square.
Learning some about openings I think is the fastest, easiest way to improve one's chess.

Zero purpose behind Bd3. Should have gone to c4 from the get go (6.Bc4).
Hanging the d-pawn wasn't very bright either

7.Bc4 is because d4 was no longer protected, after I lost it the knight and the bishop were forked, so I had no choice but to swap Queens. In the endgame I tried to sieze the empty file, and then I swapped rooks when I saw that doing so would make white's king retreat to the back, then I tried to advance my own king and lost. I really don't know what I could have done differently here.
So, if d4 is not protected, then protect it developing another piece, not moving the same piece a second time: 7.Be3. This is what beginners are taught to do: developing fast without leaving something unprotected/ under attack.
You can also protect it indirectly, because b7 is undefended: 7.h3.
You made many serious errors in that game.

Zero purpose behind Bd3. Should have gone to c4 from the get go (6.Bc4).
Hanging the d-pawn wasn't very bright either
I don't agree- swapping the bishops like that makes a lot of sense, as white has great development.
I guess that you agree that if white was able to spot the typical Scandi pseudo-sacrifice 12.d5! (12...cxd5 13.Nxd5 exd5 14. Bxd5 with a double attack against f7 and b7) then he would have a crushing position.
In this pawn position, you want your king on f3. The bishop should stay active to bother the black pawn on f5. If this pawn can be forced to advance, then both of the pawns on h3 and a4 can be defended by the bishop. Also, trading the pawn on a4 for either the one on f5 or the one on h7 is fine for white, because black's pawns on a7 and b6 are held by the single pawn on b5.
Long story short, the passed pawn should be blockaded by the king, not by the bishop.

There are some moves that don't seem to have much purpose to them, for example what is the point of 7.Bc4
You go a pawn down and then insist on trading Queens, 13.Rd1 is one of many better moves there. Then your strategy seems to be trading everything off. The endgame could have been drawn with perfect play despite being down a pawn but any inaccuracy in the endgame can be fatal especially when you are down a pawn. 46.Bd5? is one move that you could say blew it, you gave him a passed pawn and had to go down a piece to stop it promoting.
7.Bc4 is because d4 was no longer protected, after I lost it the knight and the bishop were forked, so I had no choice but to swap Queens. In the endgame I tried to sieze the empty file, and then I swapped rooks when I saw that doing so would make white's king retreat to the back, then I tried to advance my own king and lost. I really don't know what I could have done differently here.
You weren't forced to trade queens as the knight and bishop were not forked, the knight was protected.
I'd like to expand on what yetanotheraoc said.
First, it seems to me that you're an aggressive player, which is great! But that means that you need to learn how to draw a game when you're down a pawn. There are two endings where this is fairly easy to do this -- Rook and pawn endings and endings involving Bishops of opposite color.
One main rule in Bishops of opposite color endings when your opponent has a passed pawn is to play defensively and just blockade his passed pawn by putting your King on a light square in front of it. Why a light square? If you put your King on a dark square, your King won't be able to stay there because his dark-squared Bishop will be able to check you off of it. But if your King is on a light square, he'll never be able to drive you off of it, which means that your blockade of his passed pawn will be permanent. Neither his Bishop nor his King will be able to drive you off of a light-colored square. So choose a square that's the opposite color of his Bishop on the same file as his passed pawn.
The second part of this idea is to make sure that your Bishop will always be able to defend any weak pawns that you have. In the game you have two of them -- a4 and h5. Here are some lines if you want to see them.
41...Bd6 42. Kd3 (instead of 42. Bf3) Bc5 43. Bf3 (43. Bd1 Ke5 44. Ke2 Kf4 45. Kf1 {You're setting up a blockade on f1 He'll never be able to drive your King off of f1, which means that he'll never be able to promote his f-pawn.} Kg3 46. Be2 f4 47. Bd1 f3 48. Bb3 f2 49. Bf7 Kh4 50. Bg6) 43... Ke5 44. Ke2 Kd4 45. Kf1 Kc3 46. Bd1 Kd2 47. Bb3 Kc3 48. Bd1 Kd2 49. Bb3 f4 50. Bd5 Kc3 51. Bf3 Kb4 52. Bd1) 42... Ke5 43. Kd3 (43. Bg2 43... Kf4 44. Kd5 Bc5 45. Kc6 Kg3 46. Bd5 f4 47. Kb7 f3) 43...Kf4 44. Ke2 Kg3 45. Bd5 f4 (45... Kh4 46. Bf7) 46. Be4 Kg4 47. Bg6 f3+ 48. Kf1 {or 48. Kf2 Bc5+ 49. Kf1 Kg3 {when Black won't be able to queen his pawn. You've set up a blockade.}
If you need to practice, set the position at move 42 up on a computer and play against it and try to draw the game using the ideas above. Good luck!
Another technique that's good to know involves saving some tempos when your opponent has a passed pawn. Specifically, there's a better move than 48 Bxf3. Yes, you'll have to take his passed pawn eventually, but it's better to wait until the pawn queens on f1 (instead of on f3).
Why? For two reasons. a) Black will have to play several extra moves (a King move and two pawn moves) in order to force the trade on f1 and b) his King will then be farther away from your h-pawn, e.g., on f1 instead of f3. So that gives you several extra moves to try to make something happen.
Here are some lines:
Taking on f3: 48. Bxf3 (?) Kxf3 49. Kxa7 Kg4 50. Kb7 Kxh5 51. a5 bxa5 52. Ka6 a4 53. Ka5 a3 (0-1) Here he took your h-pawn on move 50.
Taking on f1: 48. Kxa7 f2 49. Bc4 Kg2 50. Ka6 f1=Q 51. Bxf1+ Kxf1 52. a5 bxa5 53. Kxa5. Here he took your h-pawn on move 53 and you've got a passed pawn by now too!
It's not enough to draw this game, but it's a good technique to know.

8 h3? loses time. Bg4 is his bad bishop on the color of his pawns. Bb4 is his good bishop, not on the color of his pawns. Kick the good bishop, not the bad bishop. 8 a3
13 Qd3?? spoils your win. 13 Rd1 kicks his queen.
20 Nxf6+?? spoils your win. 20 Ne7+ and 21 Rxb2 wins a piece.
45 Kc6? misses the draw 45 a5.
47 Kb7? again misses the draw 47 a5.
13. Rd1 loses a bishop?
20. Wow, nice. Well spotted, I didn't see that at all.