Why does White play Nc4? I was solving some problems on chesstempo. This one caught my eye (the White just played Ng2, we play as the Black):
[FEN &quot;1k5r/pp4p/5b1p/qPP/N2r1p/P4P/K1Q3PP/2R3R w - - 0 1&quot;]

1. Nb2

I saw that the right move was Rd2, yet I failed to foresee White's play.
I reckoned the best move for the White to be Qb1:
[FEN &quot;1k5r/pp4p/5b1p/qPP/N2r1p/P4P/K1Q3PP/2R3R w - - 0 1&quot;]

1. Nb2 Rd2
2. Qb1 Rb2
3. Qb2 Bb2
4. Kb2

I might be missing some moves playing as black, yet it still seems to me that White wins more material playing Qb1 instead of what appeared to be the solution:
[FEN &quot;1k5r/pp4p/5b1p/qPP/N2r1p/P4P/K1Q3PP/2R3R w - - 0 1&quot;]

1. Nb2 Rd2
2. Nc4 Rc2
3. Rc2

Why did White play Nc4, not Qb1? What am I missing? I can't see any forks or something, which would justify the attack on the Queen.
it still seems to me that White wins more material playing Qb1 instead
of what appeared to be the solution

No, if you compare the two final positions the only difference is that in the Nc4 line white has an extra knight and black has an extra bishop, so no difference if you are counting points.

Why did White play Nc4, not Qb1? What am I missing?

Good question!
Both final positions are completely lost for white. The only practical difference is that in the Nc4 line the extra piece for either side creates more possibilities for white to try and create something. Black has more work to do to get the full point. In particular the knight can land on d6 where it is a very good piece.
Another significant point is that in the Qb1 line in the final position Qxb5 comes with check and tempo whereas in the Nc4 line Qxb5 is not check.
Small points perhaps but noting them helps you build your ability to fight on in lost positions.