In general, according to an article in DifferenceBetween.net
The main difference between rules and laws is the consequences
associated with breaking them. While each is developed to invoke a
sense of order, fair play, and safety, the weight of a law is much
heavier than the weight of a rule.
However, in scientific context the situation seems to be somewhat different. For example, in scientific publications we can see Shannon’s rule, Shannon’s law and Shannon’s formula and theorem that all refer to the same concept.
So, the question is what’s difference between law and rule in a scientific context, if any?
The only way I’ve ever heard rule used in a scientific context is with various conventions for solving problems — eg. Right-hand rule (for finding cross-product directions), Kirchhoff’s Rules, etc. These are human constructs, but I suppose they’re based on phenomena in nature that we’ve repeatedly observed and that seem to hold true. (so perhaps you could consider them as synonymous to laws).
According to livescience.com, a scientific law is:
“The description of an observed phenomenon. It doesn’t explain why the phenomenon exists or what causes it.”
As a separate note, it’s important to recognize that one can’t “prove” a scientific statement, and so no law or rule can be “proven.” Science is based purely on making and attempting to explain observations of natural phenomena, and phenomena can of course change at any time and go against long-held observations – we simply don’t know enough to make rigorously proven statements about nature.