As others have said, so much is just experience. But then, as they say, while wisdom comes form learning from our mistakes, true wisdom is learning from the mistakes of others. Watching other refs (good or bad) a the level you are refereeing can help See what they do or don't call and how it is perceived. (Relying on what you see in professional games can be misleading when refereeing at lower levels, as what players can and want to play through is different.)
It can be tough to know from reactions whether we are missing stuff or whether folks are just whining. But there can be a clue when both teams seem to think fouls are being missed--it can be a clue that your foul bar is too high for the particular game.
Lastly, anticipate. By that I don't mean pre-judge. I mean anticipate where players are likely to come together, and what kind of foul has the higher potential--is a slide tackle coming or a potentially excessive charge? That can help focus you on where your attention is most needed. (Of course, we still have to keep a more broad awareness, but anticipating helps us be less likely to be surprised--the surprises can be the ones that are hard to call in the moment.)