Sharepoint has some built-in limits you should be aware of:
1) Maximum of 20,000 total files synced at one time
2) Maximum of 5,000 files synced per document library
If you have a library that’s getting close to 5,000 files, it’s recommended you split it up into multiple libraries to make syncing easier and faster.
If you have more than 20,000 files, you’ll have to choose which libraries you want to actively sync. One option is to sync things like your backfiles folder once, then stop sync and keep the local copy on your computer. Then, only actively sync libraries like the current year’s files.