The team with the most runs at the end of the final inning wins; If the home team is leading after the top of the final inning, the bottom half is not played; Tied games may be resolved with extra innings or declared a draw, depending on the agreed rules
Why people argue about this
People often assume that winning by runs at the end of an inning is all that matters, forgetting about the home field advantage if their opponent has already taken the lead earlier in the game. The confusion arises because they overlook how the official rule prioritizes the home team's status after top of final inning over simple run count.