Kernel Panic is a system measure to protect the operating system's Kernel, which is implemented when a fatal error is detected, and the system cannot resolve it. It occurs when due to some system issue, Kernel decides that continuing to run the system will result in severe damage to the system or significant data loss. When Kernel Panic occurs, the system is forced to reboot.
As per apple: If your Mac restarts unexpectedly, an error known as a kernel panic occurred, and a message indicates that your computer restarted because of a problem.
The most likely cause is faulty software. A kernel panic can also be caused by damaged or incompatible hardware, including external devices attached to your Mac. If your Mac restarts and a message appears – Apple Support (AU)
Best way to reinstall OS and it will resolve the
"kernel penic" issue. Make sure backup your data first.