Hi Jazz,
Thanks for using Microsoft products and posting in the community, I'm glad to offer help.
By default, all the subsets in SharePoint online inherit the permissions of the parent.
An example of a single line: Site > subsite > document library > folder >subfolder > files.
Once any one's permission settings of these "sets" have been edited, it will have unique permissions and will no longer inherit the permissions settings by the parent, and its downward subsets will inherit the new permission settings.
In your case, even though you have access permission to the "Main Folder", since the "Sub Folder" has unique permission settings, it will no longer inherit the permissions settings by the "Main Folder". If you don't have the access permission to that "Sub Folder" with unique permission settings, you will not be able to access it even you have access permission to the "Main Folder".
To check the permission details, you can select the folder and open its Details pane, then click "Manage Access" > "Advanced".
Hope the above information can be helpful, and please feel free to let me know if you have any concerns.
Best Regards,
Arck