PTC (positive temperature coefficient) thermistors do that. https://en.wikipedia.org/wiki/Thermistor.

They’re used as auto-resetting fuses in many devices.

Interesting!

Did not know that before...

Excellent link!