Here’s a simple step that can prevent malware and other unwanted software from installing on your Windows 10 PC.
Start by typing Choose where to install apps from in your search box and clicking on the result.
Click the drop-down arrow next to the box beneath Choose where to get apps.
Choose either Anywhere, but warn me before installing or The Microsoft Store only. Choosing The Microsoft Store only is the safest option.
If for some reason, you need to install a program or app from somewhere else, you can always change it back.