Scientists reduce the number of unwanted variables in an experiment primarily by performing experiments under laboratory conditions. This controlled environment allows for the minimization of external factors that could influence the results. Additionally, they often use control groups and randomization to mitigate unwanted variables.
While conducting additional background research can help identify potential variables and improve experimental design, the most direct way to control for unwanted variables during an experiment is through the use of controlled laboratory settings.