Account for extraneous variables in correlation research?

How can researcher account for extraneous variables in correlation research?

One way to control extraneous variables is with random sampling.
Random sampling does not eliminate any extraneous variable, it only ensures it is equal between all groups.
If random sampling isn’t used, the effect that an extraneous variable can have on the study results become a lot more of a concern.