This is the most infuriating thing so far.
https://www.fifa.com/development/education-and-technical/referees/laws-of-the-game.html
A lot of the time there seems to be a blatant disregard for the above considerations. (Through reading that I've also realised that if you somehow thump it into your own net direct from your own free-kick it's a corner to the opponent, rather than a goal. )