How to Password Protect A Directory

Please help me out, I am trying to use .htaccess to password a directory, but its not working.

There is no feature in CyberPanel that I can easily password a directory.

There is no tutorial that i can even use in CyberPanel.