Delete the file and empty the Trash. Try downloading the installer again just to make sure you have the most recent version and not an outdated or broken version that was download previously.
Make sure to use Safari or a Chrome based browser (Google Chrome, or Vivaldi) when clicking the link to access the App Store. Firefox is known to have issues accessing the link. Do you have any third party apps that may be interfering (anti-virus, cleaning apps, third party security apps)?
Try booting into Safe Mode to see if that helps you to download the installer.
Since you are having trouble here I highly recommend creating a bootable macOS USB installer if you are able to finally download the full installer. If you are unable to download the installer even with these tips, then you can download & create a bootable Mojave USB installer using another compatible Mac. You can also try booting into Internet Recovery Mode using Command + Option + R to see if you can access the online macOS installer, however, this installer will be either for macOS 10.15 Catalina or macOS 11.x Big Sur.
We are assuming here that your Mac is actually a 2012+ model (up to about 2019) that is actually capable of running macOS 10.14 Mojave.
Make sure to have a good backup before you attempt to install the macOS upgrade. You may need to end up performing a clean install by first erasing the whole physical drive before installing macOS.