Let us do all that work for you and just lean back...
Microsoft 365/Office 365: synchronize contact subfolders
One or more specific subfolders can now be used as a sync source or destination for contacts. This means that the main folder is not always used for synchronizing.