Open Start
Type Windows Security
Open Windows Security
Click Virus & threat protection
Under Virus & threat protection settings, click Manage settings
Scroll to Exclusions
Click Add or remove exclusions
Click Add an exclusion
Select Folder
Browse to the Minecraft installation folder
Select the Minecraft folder
Confirm the exclusion
If needed, add the Minecraft launcher folder as well
If needed, add the Java executable used by Minecraft as well
