The only way to establish a cause-and-effect relationship between two variables is to conduct an experiment.
First we state a hypothesis and then we make the experiment. The experiment should support, refute, or validate our hypothesis. It is done by making changes in one variable and observing is that might lead to changes in another variable (cause-and-effect).