This feature is an encryption feature only available in Windows 10 Pro and other versions except Windows 10 Home. You need to encrypt it or use a third party software program to do this. Unfortunately, Windows 7 and Windows 8, Windows 10 does not provide any password protection for folders or files.
Set folder and file passwords in Windows 7, 8, and 10
Tip: Before creating any password-protected documents, you may want to create a backup of non-password protected folders and files in case you forget the password in the future.