Can a laptop turn itself off if it overheats too much? or will it explode/burn its internal components?

My main concern is if the laptop “knows” that It’s overheated too much, to the point that keeping itself running & not shutting down is self-destructive or even fatal.

My laptop is a model from the 2010s, so I’m not sure if it has the technology to turn itself off.