How to enable Controlled Folder Access anti-ransomware feature on Windows 10/11

Controlled Folder Access is a feature of Microsoft's Windows Security desktop antivirus application. It prevents ransomware by preventing modifications to files in protected folders.