Recently I serviced an iMac that was running High Sierra at a good response speed and the owner kept getting the App store notification to update, which they did. Mojave brought the computer to a crawl and a click took literally five minutes before the action completed. It was the latest iMac available on the market with plenty of RAM and hard drive space. Usually it is not recommended to upgrade within six months of the release of the latest operating system because of compatibility bugs. So first things first, run a copy-and-paste backup of the iMac’s entire drive. If I relied on a Time Machine backup, it would copy back everything that was at fault. Then I reinstalled just the operating system and it saved the files in the process, I was thinking it would wipe it clean before installing but it didn’t. That did not help, it was still slow as molasses. I went back into safe mode on boot and used Drive Utility to format the entire hard drive. Then did a fresh reinstall of Mojave. Problem solved. Copied over the backup and reinstalled needed applications.