Major problem creating more problems, spiraling out of control endlessly: cannot install OS
Having a bunch of kernel panics is not normal. While it can be a software problem, it often is a hardware problem.

First, run Apple Diagnostics or Apple Hardware Test. If no errors are reported, start from Internet Recovery, create a new partition on your SSD, and reinstall the OS.