This post fromMiniToolshows you how to solve this problem.

Why Does Your Mac Says macOS Cannot Verify That This App Is Free from Malware?

The full message of this notification may be as follows:

Why does the system show this notification?

macOS cannot verify that this app is free from malware

If an app is not notarized, Apple cannot scan the app for known malicious software.

[Solved] An Error Occurred While Preparing the Installation?

Use Control-Click

Way 2.

open anyway

If you have this need, you might download it from the official website.

How to Fix: macOS Could Not Be Installed on Your Computer