brew install duti duti -s com.microsoft.outlook mailto
Maybe you're using macOS, and the IT department has decided everyone has to use Outlook for email. To enforce compliance, they block access to Mail.app altogether, probably with Jamf. As a result, whenever you click a
mailto: link, Mail.app will try to launch, fail because it's blocked, and instead display an error window with the message, "Access to Mail.app is restricted by Security policy."
Like the average person suffering under such a regime, you'd like to set Outlook as your default email client, but the setting to do that is exposed via the Mail.app preferences UI, which you can't open. Fun times.