A question on a puzzle on chess.com I am a beginner in chess. I am playing a puzzle on chess.com and the puzzle is like this:

White to move

[FEN "r4rk1/p4p2/1p2p2p/2p1P3/3p1q1n/1P1PR1N1/P3QP2/R4K2 w - - 0 2"]

1. Re4


Why is this the best move? Is it purely because this is the only way to save the rook, or this move can even gain some pieces?

Thank you in advance!
It is the best move because it wins the knight on h4.

Black has only two squares for its queen after 1.Re4:


2....Qf3 3. Rxh4 winst the knight
2....Qg5 3. Rg4 pins and wins the queen


Note that 1. Re4 is not the only move to save the rook. White could also play Nh5 attacking the queen first and if the queen moves save the rook (e.g. via Rg3).