Hi @Vinicius Augusto Palhari ,
As we know, a List or a Library can contain 50,000 items with unique permissions, but the recommended limit is 5,000. If you apply unique permissions on a folder, and the documents in this folder have same permissions as parent folder, SharePoint will treat as one unique permission. So for your example, you have 2 items have unique permissions (Folder and Folder 2), you can define 4'998 items with custom permissions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.