Go to the FILES > Directory Privacy
Choose the directory you want to protect and click on Edit
Check the box Password protect this directory
Assign a name to the protected directory and click on Save
Each time you protect a directory with a password, you must add a user who can access the protected directory.
On the same page, click on Go Back
In the Create a User section, enter the username authorized to access the protected directory, the password and click on Save.
Note: You can click on Password Generator to generate a password automatically.
You can also manage the users authorized to access the protected directory, delete them and change their password from your cPanel account > Directory privacy.