Since it was your first game, you played very well. To your main question (should I have taken the queen instead of the rook?) the answer is yes.
A queen is worth almost twice as much as a rook, and there was no compelling tactical reason why you shouldn't take the queen (your rook was protected by the bishop on b3).
This was my first "real" game and I blew it hard at the end when I thought I was going to win for sure.
I thought I was going pretty well. Should I have taken the queen on move 20 instead of the rook?
What should I have done differently?