As far as I know (don't take my word for it) the tiebreaker depends on who did you win against. If you beat the second best player, your tiebreaker is higher than when you beat the last one in standings.
Swiss tiebreakers

Not 100% sure but I think it has to do with the opponents you play, like if you play stronger opponents you should have a higher tiebreak. For example if I go 3-0-0 but I beat 3 people who are 2-1-0, but you also go 3-0-0 but beat 3 people who are 0-0-3, then the tiebreaker goes to me. I'm not really sure if this is right though, since I'm not 100% sure how swiss tiebreakers work either. lol

This support article explains it: https://support.chess.com/article/314-how-do-ties-in-tournaments-work
In short, the tiebreak score is based on the performance of your opponents that you have beaten or tied. Think of it this way, you could have the same wins and draws as another player, but your wins were against higher performing players. So, you should be rewarded for that in some way and that is achieved through the tiebreak score.
From the Support Article: A player's tiebreak score is calculated by adding together the score points of the players they have defeated and half of the score points of players they have drawn against.
Can someone explain to me how swiss tiebreakers work? It doesn’t make any sense to me that two people can have the exact same number of wins draws and losses and have a different tiebreak score.