It's possible that this is the Expired Certificate problem.
There is a support article at
https://discussions.apple.com/thread/8561304 with directions that may fix it.
Step 1. Go to your applications folder.
Step 2. Find the installer for macOS Mojave.
Step 3. Right click on the installer and click "Show Package Contents".
Step 4. Click on folder named "Contents".
Step 5. Click on the folder named "SharedSupport".
Step 6. Delete the file named "InstallInfo.plist".
Step 7. Enter your administer password to confirm.
Step 8. Now open the installer.
This solution is also seen at an the article at
https://osxdaily.com/2019/10/24/fix-install-macos-application-damaged-cant-be-used-error-mac/