The phrase
"to control the variables" means to manage or manipulate the factors that can affect the outcome of a situation, experiment, or study. It involves ensuring that only specific factors are allowed to change while keeping others constant or unchanged in order to accurately observe and understand the effects of the controlled variables.
Full definition