How do I do a clean install of macOS Mojave?
Make sure first that your hardware is compatible with Mojave - macOS 10.14. Some sources to check:


http://osxdaily.com/2018/06/05/macos-mojave-compatible-macs-list/
https://www.cnet.com/how-to/here-are-the-macs-that-will-work-with-macos-mojave/ 


To do a clean install of Mojave:


Make a usb install drive following these instructions.
Back up your system drive in triplicate, or whatever you're comfortable with. Ideally one would be a literal clone of your system.
Boot from the USB drive, and erase your system drive in Disk Utility. Format it as HFS+.
Quit Disk Utility, and install Mojave on the drive you erased.


If those steps don't work, I would suspect a hardware incompatibility or problem.