What is the order of advancement checks?

I am trying to create a system where every mob type gives something, and then every mob has a rarity which increases how much of that thing it gives. I am going to use Advancements and one of them will check for the rarity of the mob, and the other one will check the type. They will update a scoreboard and after both, I need to execute the giving part, which requires other two to happen beforehand, I do not want to hardcode every single mob in the game with scoreboards, but If I have to I will do that, but basically after I create this system I can input any mob into the tag and make it work for them.

Continue to help post