Electromagnestism Experiment

Electromagnets have different strengths depending on how much weight they need to be able to carry. What does the strength of an electromagnet depend on?
Strength of an electromagnet (magnetic field strength sensor)
The Danish physicist HC Ørsted discovered in 1820 that when an electric current ran through a wire, a magnetic field arose along the wire. With this discovery, HC Ørsted was able to demonstrate that
there is a connection between electricity and magnetism, which today is referred to as electromagnetism.
The discovery was ground-breaking, as science at that time perceived electricity and magnetism as two completely separate concepts.
Electromagnets have different strengths depending on how much weight they need to be able to carry. What does the strength of an electromagnet depend on?