You have missed where the energy needed to cause heating comes from.
Electric current in materials causes heating because moving electrons shove material molecules and cause random vibrations. Those random vibrations are the generated heat. Electrons would lose their velocity soon if there were nothing keeping the movement going on. But there is - the electric field, the reason of the electric current. Without it there wouldn't be any current.
Practical electricians do not think the electric field, which is a 3D space vector field. They are not interested in how strong the field is in different points and what's its direction. They are only interested in how much the field is able to do work (=give energy to electrons) if they let it to move electrons in a conductive material.
The ability to do work is measured as voltage. If electric field moves so many electrons per second from point A to point B that the current is = I and it makes work (causes heating, rotates a motor, generates radiowaves etc...) so that the power (=work per time unit) is P, the voltage between A and B is =P/I. That's not magic it's the basic definition what voltage means. Most of us know that P=UI. It's very direct consequence of the definition of the voltage. Voltage is practical also because we have working voltage sources which can keep the voltage quite constant if the current taken out of the source is reasonable.
In metals and many other conductive materials the material brakes moving electrons so that to have current we need voltage which is proportional to the wanted current. That's the original Ohm's law. For resistors we write it U=IR where the proportionality factor R is the resistance.
We can combine the original definition of the voltage and Ohm's law in resistors and get P=(I^2)*R or as well P=(U^2)/R which both say the power which heats a resistor. The latter seems to tell that bigger resistance means less heating. That's true - it happens because the current is smaller if the resistance is bigger.