The macOS Mojave download may also fail if you do not have enough storage space available on your Mac.
You can also check the live status of the Apple Server to make sure everything is alright on Apple's end. If this is the issue, try again later to see if the download now works. It may be because a lot of people are trying to download macOS Mojave at the same time. There are a few reasons why you may get this problem.