Answer: Using the same number of turns of wire for each electromagnet.
The formula of magnetic field strength of a solenoid or electromagnet is,

Where, B is the magnetic field strength, μ is the magnetic permeability, n is the number of turns per unit length, and i is the current in the wires.
To study the change in magnetic field strength B, the current i, and number of turns per unit length should be same so that
and we can study the change of quantity of iron as core.