This is for your safety. But if you wish to prevent the popping up of this prompt, you will be compromising the security of your computer in various aspects. However, if you still want to proceed and disable it, it will be at your own risk.
These files might be harmful to your computer
There are two things that we can do to disable the These files might be harmful to your computer prompt from appearing on Windows 11/10:
1] Use Internet Options
Search for Internet Options in the Windows Search box. Select the appropriate result. Navigate to the Security tab. Click on Local intranet. Select Sites button.
Make sure that the option for Include all network paths (UNCs) is checked. To save changes, click on OK. Close Internet Options. Reboot your network, and your issue must now be fixed.
2] Use Group Policy Editor
Open the Group Policy Editor. Navigate to the following path: User Configuration > Administrative Templates > Windows Components > Internet Explorer > Internet Control Panel > Security Page
Look up the policy of Internet Zone Template. Select Enabled. From the Options, select the drop-down for Intranet to be set to Low. Next, look up for the policy of Site to Zone Assignment List.
Mark it as Enabled too. In the Options section, select the Show button. Here, you can enter the Server names, URLs, and IP Addresses to a white list with a value set to be 1. Then, navigate in the Intranet Zone folder in the same location. Look for the policy of Show security warning for potentially unsafe files.
Select Enabled. From the Options section, select Enable from the drop-down. Reboot your computer, and this issue that you have been facing must be fixed now. All the Best!