When a steady current flows through a resistor, the resistor heats up. We say that "electrical energy is dissipated" by the resistor, that is, converted into heat. But if energy is dissipated, where did it come from? Did it come from the voltage source through the wires?
The dissipated energy in a resistor comes from the potential electric energy of a current source. This is known as the Joule effect. In fact, this energy is carried by the wires until the resistor.