When you get very tiny advantages, a pawn in the early ranks is not big. you rarely win by trading everything you got. and hoping for the best, as you still have to end up with the opposition to be able to promote. What do you then? You try to squeeze your advantage, but you need pieces. You can exchange, but only if you are forced to do (when it attempts against your plan) or in your terms, where it benefits you.
You traded your knight, which was the piece to give you conterplay. He had 2 weak pawns. And due to the trade, you were the one worrying of losing them as you were tied up in the defense. Your knight could have jumped to c6 in 3 moves, or could have mounted pressure to the c pawn in different directions. So yes, trade when you have advantage, but just enough to poke somewhere else to divert pieces. You will either gain key squares, force them to push pawn when they dont want to, divert pieces to other squares or tasks, or even force mistakes.
Learning how to squeeze small advantages is quite hard to master, most of the times i suck at it, but when it works, it gives you clear advantages that come seemingly out of nowhere. Let me give you 3 examples.
Here i won a whole piece. I could have traded whenever i wanted, but i want to do it in my terms. Easy win. The advantage was big, but the idea is the same.
Or this one is more clear.
lichess.org/LDSvqFNmMRAi The position is close by move 29. when i won a pawn. But its a closed position, Between his mistake (pushing the h pawn) and transferring my advantage to the king side (trading pawns from my queenside for the ones in his kingside), the advantage is so big that it is crushing, and it is just 1 pawn advantage. But note that i refused to trade my bishop because i simply will have a lot of trouble trying to attack his pawn chain only with my rook.
But this one is the best example.
lichess.org/kevkHEPUVLmS He gave me a huge space advantage, so i took it. So, by refusing to trade, because i have space, i want him cramped, by move 20, equal material, but im making progress little by little, he just wants some relief, then i force him to make a small trade, in my terms. Move 25, same material still, but because i made the terms, he has little coordination. I have a lot of advantage with 0 extra material in the whole game.
That position is enough to make some small trades get something, but if you keep squeezing, you get bigger advantages, thats why you dont trade all. Poor guy was so desperate, that he traded his knight for 2 pawns, but didnt see the tactic after. And even so, after gaining huge material advantage, i didnt rushed to trade everything and simplify, i was still proactively looking for trades that gave me even more advantage. So i gained 2 extra pawns.
By move 35, i could have gotten material if i wanted already, but i had the patience to push my advantage slowly, but steadily.
move 35. Same material. +7, and i even missed a couple of crushing moves, and i was creating weaknesses everywhere and at the end, something was gonna give.
And when you start to cash in, you simply get more and more advantages because you force a bad trade to them, and eventually the advantage gets so big that it just snowball.
So, when you get advantages, you have to recognize them, identify your opponents and your weaknesses. try to trade your weakness and have enough material to poke and apply pressure. If you do it right, a 1 pawn advantage can be crushing. Its allright to trade weaknesses. Say your d pawn for his c pawn. transferring your advantage somewhere else (if he had his knight in d4 and you had your knight in c6 and he traded, you would have transferred your advantage to the c-d pawn chain), or your b pawn for his a pawn and had a passed a pawn yourself. But you traded poorly because you thought a pawn was enough to win. A pawn advantage is no real advantage unless its free to promote, its only leverage for applying other kinds of pressure and snowball.
I know is a wall of text, but this topic, or rather, this skill to squeeze seemingly insignificant advantages is the difference between 1800 and 2000~ish. But its also the difference between Carlsen and the rest, he can squeeze water from a dry rock, we might not, but some drops of lemon juice are often enough to win close games. Dont trade everything if you cant use the advantage. Thats the rule for exchanging.