Dear Marc Font Ollé,
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
From your description It seems you want to know how to Creating Password-Protected Folder in SharePoint
SharePoint did not provide the function to add lock on folders. However, regarding to sensitive file protection, SharePoint provided some other features to protect sensitive files. Based on your requirement, those sensitive files are all stored on same location. May I know if those are all Office files or PDF files? If so, Information Management Rights(IRM) might able to suit your needs.
IRM is applied on whole Library level. We suggest you creating a separate library and moved those files in it. After it is enabled, only the permission granted people are able to access it. Even they download the files and share with other users locally, Other users will not be able to view it. It will always require log in to correct account to view the contents. You can enable it following these steps.
Please be noted that this feature requires "Azure Information Protection" service in your Office 365 Plan.
1, Turn on IRM service on tenant level from SharePoint admin center. Global admin or SharePoint admin role is required for this action.
Go to SharePoint admin center >> settings >> classic settings page >> In the Information Rights Management (IRM) section, choose Use the IRM service specified in your configuration, and then choose Refresh IRM Settings.
2, Apply it to the library.
Go to the SharePoint library >> settings icon >> library settings >> advanced library settings >> Under Permissions and Management, select Information Rights Management >>select theRestrict permission to documents in this library on downloadcheck box and enter policy name and description, apply it.
For more information about IRM, kindly check these articles.
Set up Information Rights Management (IRM) in SharePoint admin center | Microsoft Learn
Apply IRM to a list or library | Microsoft Learn
Your understanding and patience will be highly appreciated.
If there is any misunderstanding, please feel free to correct me.
Have a nice day!
Best regards,