It was attached on the coil of an electromagnet. I have discovered it when removing the seal of adhesive tape from the coil, to measure the thickness of the cable and the number of turns.
This component is connected in serial with the coil. I suspect that it may be a thermistor or a varistor, which reduces electrical consumption when the coil overheats.
The coil connects to 50v and has a resistance of 4.9 ohms. So I suppose that it will have an initial consumption peak of 10 Amps, it will heat up quickly, this thermistor (or varistor) will act, increasing its resistance and reducing electrical consumption to prevent the coil from overheating, that will also reduce the electromagnetic force.
This protection could also be mainly to protect the power supply, reducing the electrical consumption after the initial peak of 10 Amps.