Two Elements Can Make Several Compounds
The law of multiple proportions applies when the same two elements form more than one compound. If the mass of one element is kept fixed, the masses of the other element that combine with it form a simple whole-number ratio.
OpenStax Chemistry: Atoms First 2e explains this law as a fixed mass of one element reacting with masses of another element in a small whole-number ratio in Early Ideas in Atomic Theory. Britannica summarizes the same mass pattern in
law of multiple proportions.
So this law does not compare any two substances at random. The compounds must be different, but their elements must be the same.