This article describes three ways to lock a folder in Windows 11. There is one built-in method and two third-party methods, all of which are completely free.
How to Password Protect a Folder in Windows 11
The easiest way to lock a folder is to enable encryption. This prevents other computer users from opening/viewing your files. You must be logged in to your account to open the files in the folder you are locking.
This is built into Windows 11 and is very easy to enable:
Find the folder you want to lock, right-click it and choose Properties.