You can’t block windows system files else windows will not run so get that idea out of your head. You should be more careful not to get viruses and malware in the first place. Do a clean install and change your online habits to good safe ones
Trying to block Cmd is ridiculous. If you could block it windows wouldn’t even run properly
Also you don’t need bit defender or any other crap like that Windows defender is good enough don’t be fooled by what people say around here most antivirus programs stank and cause huge performance problems
Windows defender is built-in and windows firewall is already built-in and your best protection is what resides between your ears
Like I said you are the best protection you have and this didn’t just happen. you clicked on something and ran something probably install some software that caused the issue. If anything just add Malwarebytes to Windows defender and you should be fine
some get by with just the free version.
also, you have windows defender built in and you also can configure the Ransomware protection feature in Windows 10 now. I don't even use Malwarebytes and never have an issue. I just use the built in features of windows and am careful.