If you want free USB lock software, first decide whether you need to block USB ports on a PC or encrypt files on a USB drive. This page is about USB access control: stopping unknown flash drives, phones, external disks, and removable storage from being used on Windows computers.
This can stop a specific controller or device, but it is easy to reverse and may also affect keyboards, mice, printers, or other USB hardware if done too broadly.
Windows Pro and business editions can restrict removable storage through policy. It works for managed PCs, but it is not friendly for home users or small teams without IT setup.
Registry changes can disable USB storage drivers. This is free, but risky if users are not comfortable editing system settings or if different device types need different rules.
Some computers let you disable USB ports before Windows loads. This can be strong, but it is coarse control and does not give you per-device allow lists.
Permissions can reduce copy-out risk for certain folders, but they do not directly manage which removable devices can connect to the PC.