It does not depend on the thickness of the wire. Well, not directly.
As steveastrouk wrote, the magnetic field depends on the current through the wire and how often the wire goes around the core - the number of loops.
If you use a thinner wire, you can wrap more turns into a given space. Good for the magnetic field! But...
A thinner wire means more resistance. More turns mean a longer wire and that means even more resistance. More resistance means that a given voltage can drive less current through the wire. Less current means a lower magnetic field.
If and when the two effects cancel each other, well that's what math is for.
(Of course you could increase the voltage to keep the current in the thinner wire the same as in the thicker wire, but that would increase the thermal losses in the wire as well.)