macOS has many features that help protect your Mac and your personal information from malicious software, or malware. One common way malware is distributed is by embedding it in a harmless-looking app.
You can reduce this risk by using software only from reliable sources. The settings in Security & Privacy preferences allow you to specify the sources of software installed on your Mac.
Choose Apple menu > System Preferences, click Security & Privacy, then click General.
Select the sources from which you’ll allow software to be installed:
App Store: Allows apps only from the Mac App Store. This is the most secure setting. All the developers of apps in the Mac App Store are identified by Apple, and each app is reviewed before it’s accepted. macOS checks the app before it opens the first time to be certain it hasn’t been modified since the developer shipped it. If there’s ever a problem with an app, Apple removes it from the Mac App Store.
App Store and identified developers: Allows apps from the Mac App Store and apps from identified developers. Although apps from outside the Mac App Store are not reviewed, the identified developers are registered with Apple. If problems occur with an app, Apple can revoke its authorization. macOS checks the app before it opens the first time to be certain it hasn’t been modified since the developer shipped it.