Making a guess, then seeing if you’re right.
Science is, essentially, the practice observing specific cases within a system, using those observations to make a general hypothesis of how the system works, then coming up with testable predictions about things you don’t based on this hypothesis. (note: this is called ”inductive reasoning”).
If your predictions are consistently accurate, you MIGHT be right.
There’s a whole method for how to go about making predictions and the specifics of testing them. It’s named The Scientific Method.