You get points "below the line" that count toward winning games. You get points "above the line" for HOW you win those games. You also get bonus points "above the line" for other things, that count toward your total score (as described below). The total of ALL the points (game and bonuses) determine the result.
First, victory margin of 2-0 in games is most impressive, and scores a bonus of 700 points. A victory margin of 2-1 is less impressive, and scores only 500.
You also get bonuses for slams (bidding and making a contract for every trick or all but one) If you are "not vulnerable," (no games to your credit), the bonus for a grand slam (every trick) is 1000 points, and 500 for a small slam (all but one). "Vulnerable," (one game to your credit), these bonuses, are 1500 and 750.
You also get points for "setting" an opposing contract (your opponents make a bid that they can't fulfill). These penalties are increased if you announce "double" after the last bid. Of course, your opponents get points for setting YOUR contracts, and more if "doubled."
The purpose of bonuses is to try to capture the TOTALITY of what happened. Here's an example: Your opponents make two games, 3NT and 4 spades, for 100 and 120 "game" points respectively. They also win the rubber, two games to one, for 500 bonus points. That's a total of 720.
Your side made only one game. But it was a "grand slam" with a 1000 point bonus. Add this to your 210 "game" points, and your total score of 1210 beats their 720.
Another example: They score two games to none, for 920 (120+100+700). So far you're losing. But you also scored 1000 points in penalties. That'because you doubled their contracts twice after they had "game on" and put them down two tricks (for 500 points) each time. Multiply by two to get the 1000 points, which beats their 920.
Usually, a team that wins a rubber two games to one or two games to none scores the most points. But I have given you two instances where this is not the case. And the difference was "bonus" points.