My Mac mini behaves in strange ways. Certain applications open randomly, downloads just don’t download sometimes, for a while I could not empty the trash, etc. I want to cleanly erase everything that my computer is including the kernel, Hardware, SMC Recovery firmware and everything else and just put back fresh operational replacements. I am not looking to buy a new computer (like other questions here said to do) I do not know which one or couple of things is corrupted but I want to just get rid of everything and start over without bricking my computer. Any ideas?
Restart the machine, while holding ⌘ Command⌥ Option R. The option key gives you the latest supported version of macOS rather than what it shipped with. Then follow the prompts to reinstall a new macOS.
As long as you have a backup of your needed documents and settings I would also erase the drive with disk utility within the process of reinstalling, that will ensure nothing is left over from a potentially damaged OS install.