Here has some guidance and steps to fix crashing on mac:
Remove all external devices excluding AC power connection, display, mouse, keyboard, and Ethernet connection.
Restart Mac and immediately press and hold the D key until Apple Diagnostics screen appears.
(If the screen does not appear, then turn off firmware password if any, or hold down Option + D during restart to start the diagnostics over the Internet).
When Apple Diagnostics is aware of your language choice, it displays a progress bar to check your Mac (which may take a maximum of 3 minutes).
When Apple Diagnostics finds any issues, it suggests solutions and displays reference codes.
Opt from the various options:
Press Command + R or click Run the test again to repeat the test.
Press Command + G or click Get started to fetch details about service and support options.
Press R or click Restart to restart your Mac.
Press S or click Shut Down to shut down your Mac.
When done, you need to Restart or Shut Down your Mac.
After upgrading your Mac to the latest macOS Monterey, Big Sur, Catalina, and Mojave, if the system freezes or slows down, then restarting your Mac in Safe Mode helps fix the frequently crashing issue.
Safe Mode loads only the important kernel extensions, verifies the startup disk and repairs directory issues (similar to Disk Utility’s verify and repair functionalities), prevents startup/login items to launch automatically, deletes cache files, and disables user-installed fonts.
these methods works Mac mini and imac or even macbook pro
To start your Mac in Safe Mode, do the following:
Restart Mac and immediately press and hold the Shift key until you see the login window.
After the Mac boots into Safe Mode, if no issue occurs then restart it again without pressing any key to start normally.
To know whether you are in the safe mode, open spotlight and type system information.
Use the software section of the system information window to verify the boot mode as Safe instead of Normal.
If the issue comes back in the normal mode, then the login items may be incompatible.
If the Mac does not boot into Safe Mode, then there is low space on the startup disk.
Clean up your Mac’s startup disk to allow your macOS to function correctly.
C. Delete Software Update Caches
If your Mac crashed during the auto software update, then you must clean the following files:
/Library/Preferences/com.apple.SoftwareUpdate.plist
/Home/Library/Caches/com.apple.SoftwareUpdate/
/Home/Library/Preferences/ByHost/com.apple.SoftwareUpdate.123.plist
Finally, a suggestion for you, If you are thinking to switch or move to laptop then I think
macbook pro m1 variant will be a good option to getting better performance on regular and even heavy task.