Ignore the above post it is wrong, click on this link, How to upgrade to macOS Mojave - Apple Support
Go to Section 4 and click on Get macOS Mojave.
The Mojave page should say 'Get', if it says 'Open' then the App Store has detected a copy or partial copy of Mojave on your mac, look in your Applications folder for Install macOS Mojave.app, move it to the Trash, empty the Trash.
Connect your mac to your router via cable rather than rely on WiFI. Restart your mac, go back to the App Store Mojave page and start downloading Mojave, do not use the mac whilst it is downloading, if other devices share your internet connection then don't use them either while the download is in progress.
Before upgrading make a full back up of your Mac.
Check that third party apps you use have updates available for the new OS.
https://roaringapps.com
Check that your printers/ scanners etc have updated drivers and software available for the new OS.