1. In the Finder  on your Mac, locate the app you want to open.

    Don’t use Launchpad to locate the app.

  2. Control-click the app icon, then choose Open from the shortcut menu.

  3. Click Open.

    The app is saved as an exception to your security settings, and you can open it at any time by double-clicking it, just as you do with any registered app.


Or you can check this article: https://support.apple.com/en-in/guide/mac-help/mchleab3a043/mac