when should I trade?


I've looked at one of your games and I think I can provide some advice. I think you need to look ahead more, judge if trading where and what you're trading will hurt the opponent more than you and make an opening for you.
I hope this has served as some help regarding your troubles.
Another reason for trading is having less space. Then you obviously have more difficulties navigating than your opponent. Trading may help.

Just like most chess questions, the answer is "it depends". Generally you don't want to trade pieces if you don't gain anything by it/your position becomes worse as a result.
Example:
after 3. d4, black has no better options than to exchange pawns in the center, any other option just leads to a better position for white. But after 4. nxd4, black should not exchange pieces in the center as it just allows white to centralize the queen without any resistance

In general maybe something like this would help...
Does capturing their piece do something good for you? (like sred mentioned it would help free up room if you have less space)
If the capture doesn't do something good then ask:
If they capture your piece (and you recapture it) are you ok with that position?
If the answer is yes then don't capture, do something else. (as dababy points out recapturing often brings your pieces forwards)

So when it does something really good for you (or avoids something really bad happening to you) then capture...
... meaning another way to say this might be... when in doubt, don't capture.

Every position is different, if you have a bad bishop ( bunch of pawns on light squares you can try an trade off you LSB. If the position is closed and it cant be opened very easy..your knights are usually better then your bishops. In that case you may look to trade your bishops for their knight. Trading when you can damage pawn structures can be good ( not always) and of course, if your up a pawn or two you can look for trades for a favourable endgame. Someone else already mentioned space advantages
Fischer never had any poorly standing pieces. When a piece of his would stand badly, he traded it off.
You should trade when:
1. You have material advantage and try to simplify, so that the rest of the game becomes easy to win.
2. It's giving you positional advantage .
2. When
Start by keeping ALL your pieces on the board. Don't trade unless you're forced to or there's an obvious threat. Play with as many pieces on the board as you can to get a tactical understanding of the game. As you'll play more games, you'll start to understand when it's the right time to trade a piece and when it's better to keep a knight for a bishop OR a bishop for a knight OR knight/bishop in exchange for a rook (positional understanding). Keep playing. Good luck!