Try booting the computer into Safe Mode. If you can boot into Safe Mode, then run EtreCheck and post the report here so we can examine it for clues.
Make sure to disconnect all external devices in case one of them is causing a problem.
If you cannot boot normally or into Safe Mode long enough to run Etrecheck and get a report, then you can try posting several of the Kernel Panic logs located in "/Library/Logs/DiagnosticReports" with file names beginning with "kernel".
FYI, it really helps to provide the exact model of the Mac and version of macOS involved when asking for assistance online. If you can boot the Mac, then you can get this information by clicking the Apple menu and selecting "About This Mac", otherwise you can get the exact model by entering the system serial number here
Check Your Service and Support Coverage - Apple Support
You can also try running the Apple Diagnostics to see if any hardware issues are detected. Unfortunately the diagnostics don't detect most failures.
Edit: Forgot to include a link to the instructions for the Apple Diagnostics.
Use Apple Diagnostics to test your Mac - Apple Support