It prefers simpler theories that explains the exactly same phenomenon.
If you have evidences for one theory, that usually means other theories failed to predict the phenomenon in the exactly same situation. In this case, they can't be compared using Occam's razor, because they don't explain the exactly same phenomenon. The failed theories should be immediately rejected because they are simply wrong.
A quick patch is to make exceptions. That is, to add the unexplained phenomenons into the failed theories and say exactly how they are different. But the complete description of the failed theories with the new additions would quickly grow very big, surpassing the working theories even if they seem complicated. In reality, there could be unexplained phenomenons in every theory, say the exact values of the inherent randomness in the physical world. But they are not explained by any theory, so it doesn't change what should be prefered. Starting from here, people may imagine how a theory could be fixed in better ways and evaluate it based on more assumptions. So we feel they didn't directly reject everything with small flaws. But technically Occam's razor could only be applied after the fix.
You could say the complexity of a part of the theory is "explained" by some complicated phenomenon. But by what I said, you should be compressing the description of the phenomenon using the theory, instead of compressing the description of the theory using the phenomenon. Actually it doesn't matter much, as they are both increasing I(X;Y) if we consider H(X) and H(Y) their Kolmogorov complexity. But compressing the description of the phenomenon is easier to think, if we consider technically we should add the complete description of all randomness into the theory to evaluate it, but we don't, and we compress a part of the randomness in different situations as approximation. Doing the opposite would either create duplicated work, to describe the theory in too many different ways, and make it difficult to say which ones are the same theory to allow us to compare between theories, or leave irregularities that the relations between the theory and reality are in different directions for the first set of evidences and other evidences.
Another answer says: "You need to take into account the plausibility of the assumptions." This is wrong. Occam's razor means you could measure the plausibility of assumptions, if not contradicting with reality, exclusively by the length of the description of the assumptions. If you have considered other means of plausibility, you might be using Occam's razor together with something else. It could be better or worse, but that part isn't from Occam's razor itself.
So, "there is a god" is indeed a simpler expression than the physical theories by Occam's razor, even if you consider it implausible. But it doesn't say what the god is like and what does the god do to the world, and you still have to add the complete description of a physical theory to make it able to explain things. "There is a god" plus the physical theory together would be more complex than the physical theory alone.