The heating element of an electric heater is a resistor. According to Joule’s law of heating, the amount of heat produced by it is proportional to its resistance.
H = I2Rt
The resistance of the element of an electric heater is very high. As current flows through the heating element, it becomes too hot and glows red. On the other hand, the resistance of the cord is low. It does not become red when current flows through it.