Applies to: Windows 10, version 1709 and later
Controlled folder access was introduced in Windows version 1709 to provide enhanced data protection from malicious apps and viruses, such as ransomware. It is part of Windows Defender Exploit Guard.
Go to the Windows Defender Security app to enable Controlled folder access.
Step 1: Click the shield icon in the taskbar or search the start menu for Defender.
Step 2: Click the Virus & threat protection tile and click on the settings label:
Step 3: Turn the switch to On
And that's it; this feature should protect your important folders from being modified or encrypted by a malicious malware or ransomware.