What causes cables to get heated up and melt in a circuit? (DC Circuit)
The mathematical formula for the Joule heating in a wire is:

$$P=V\cdot I=I^{2}\cdot R=\frac{V^{2}}{R}$$

As you can see when a large amount of current passes through a wire then it will get very hot as it is in the second power, obviously with R a constant as you have a specific wire.

But if you change the resistance (meaning that you take another wire) using a standard voltage, then using Ohm's Law:

$$V=I\cdot R$$

the current I that passes through it must fall, as to continue satisfy the Law.

So if you use another wire with greater resistance (assuming you keep the voltage constant, meaning you don't change the voltage source) then it is not going to be heated more, as you can see in the Joule heating formula both the resistance and the current change (resistance increases while current decreases).

In fact if you use the last Joule heating formula you will be able to see that the inconclusive previous result in which two parameters change, one up and one down, can be resolved now as the voltage is constant and the resistance is increased the result is that P decreases.

Hereby if you change the wire with one having more resistance then it will be heated less.

Caution

This answer only gives the physical background that ties resistance current and voltage. It doesn't try to show that in a specific real circuit is safe to assume that with wires of greater resistance the heat produced across the wire will be less! There are a lot of parameters in a real circuit to be taken into account before giving an answer regarding the heat produced. Also the analysis I made is obviously only elementary as the question seems to ask what happens in a theoretical general case, which again it isn't the same case with a real circuit.