The .msg file issue is mainly caused by the browser’s (like MS Edge) security:

Try to Download the .msg File with Another Browser

If you are encountering the download security error when trying to download .msg email attachments in a specific browser, then using another browser may let you download the .msg file from SharePoint.

Edit the System’s Registry to Bypass the Security Error

If you are one of those users who are bound to use the Windows built-in browser (like Edge), then you may edit your system’s registry to bypass the MS Edge security error by excluding the .msg file extension from the blocked list of the Edge browser. Warning: Move forward at your own risk as editing the system’s registry can be a risky job if not done properly and you may cause undying damage to your data/system.

How to Remove the Security Error when Downloading   msg  Email Attachments from SharePoint  - 38How to Remove the Security Error when Downloading   msg  Email Attachments from SharePoint  - 6How to Remove the Security Error when Downloading   msg  Email Attachments from SharePoint  - 22How to Remove the Security Error when Downloading   msg  Email Attachments from SharePoint  - 2How to Remove the Security Error when Downloading   msg  Email Attachments from SharePoint  - 78