Why is exchanging these knights the best move for white? Why is exchanging these knights the best move for white? I'm trying to understand how to get better with strategy and tactics.
Despite the difference in evaluation, e4 is not really a mistake. White is a rook ahead and will win this game anyway, provided that they don't blunder. Perhaps Nxc4 leads to a victory a few moves faster, almost within the engine's search horizon; that's probably why the engine prefers it over e4.
However, even humans should prefer Nxc4. If you're this far ahead, you should exchange material; every exchange means less chance of threats from your opponent. A two-to-one advantage is much more decisive than an eight-to-seven. Black's knight is also more active than White's, that's another reason to exchange it. (That the engine indicates that Black should exchange knights after e4 is surprising, but it only underlines how bad Black's position actually is.)
The advice about exchanging when you're ahead is of course not a rule set in stone. You should always keep in mind the (potential) activity of the exchanged pieces. And if you're only a pawn ahead, that doesn't need to be decisive enough for the win. Rook endgames and endgames with opposite bishops are notoriously drawish, and there are more examples out there, but you don't have to worry about them for now.