Plug in a USB and then open terminal and type:
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Replace MyVolume with your USB name in disk utility.
after it’s done, hold the option key on boot till you see the List of boot disks. Boot from the USB and select enter.
when booted from the USB in macOS Utilities head over to the top bar and click Utilities>Terminal and change the date to 24 Sept 2018 by typing:
date [mm][dd]HH]MM[yy]
where mm is month and MM is minute.
then click install macOS. It should work.
the reason for this is that Apple has stopped accepting the signatures used in Mojave and fail the verification, to encourage updating to Catalina. Thus you have to change the date for verification to succeed.