why did the game review engine say that a pawn should’ve been promoted to a rook instead of a queen?

It doesn't say a rook promotion is better when I look at it. There's no reason for an underpromotion at all, either.
Sometimes you have to give it a moment; I once played a rook sac that was considered a mistake at first, but then it was brilliant when I checked again.
Edit: I looked at the wrong move. It actually says they're both equal (+M11), which makes sense, seeing as that piece has to be taken either way, meaning it doesn't really matter.

Sometimes underpormoting is necessary to avoid stalemate, or to to knight to prevent a weird checkmate.