I won't dispute the conclusion of those who took the "cook-off" photo, but will say it's a far, far extreme case - as in you were hosing out hundreds of rounds in a row until the barrel glowed to get it hot enough to cook off before the bolt could close.
A typical cookoff scenario is that you fired a couple hundred rounds in combined auto/rapid semi, within a minute or two (literarily) in a very intense firefight. The barrel is now extremely hot up front, and the heat is working its way back towards the thick breech/chamber area by conduction, and maybe 15 seconds to a minute after you stopped firing, with a round fully chambered, the chambered round goes off from the heat leaching into the case. That round will fire, and another will load if there's one left in the mag, and that one might cook off in another 15 seconds to a minute.
The first, catastrophic KB pic you showed is clearly from gross overpressure, just as the second (labelled "cook-off") was clearly an OOB/head separation… which can result from bad ammo or a high primer, or debris on the bolt face, or, apparently, a "cook-off".
ETA to fix "cook off"