Syncing Photos library via USB has been plagued with errors for years but lately it has been a little better.
MacOS Extended (case insensitive, journaled, GUID) is the same as HFS+ and should be used with HDD, APFS is OK especially on a SSD. Also make sure that when you Finder > Get Info of the external drive it has "Ignore ownership on this volume" at the bottom Sharing & Permissions.
Do NOT use any 3rd party virus apps or "cleaners" because they produce obscure errors and are not needed. Sometimes a clean install is needed to fix the damage they have done.
I have done this if the sync repeatedly fails or is incomplete. Doing this allows to start on a clean slate sync:
0. On the Mac quit Photos and backup the Photos library (just in case because messing inside Photos library is generally not recommended because it might corrupt it).
1. Empty the old iOS/iPadOS Photos library: Create an empty dummy folder to the Mac's Desktop. Connect iPhone/iPad via USB to the Mac. Open your home folder and choose your iPhone/iPad in the folder's sidebar, and there choose Photos tab > Sync photos to your device from: Choose folder... > choose the empty folder you just made > Apply. Wait for the sync to finish. In iPhone/iPad check that all previously synced images are deleted. If not, re-apply the sync (if there are numerous old images, deleting them might time out before all images are deleted).
2. On the Mac in your ~/Pictures folder (or wherever the Photos library is stored), right click or control-click the "Photos Library.photoslibrary", choose "Show Package Contents" and delete the "iPod Photo Cache" folder (it holds a database of previous syncs and might have been corrupted. It is re-created in the next step). Empty trash and restart the computer.
3. On the Mac open Photos.app and make sure the Photos library is set as "System Library" in Photos.app settings (you might leave Photos.app open during the sync). Connect iPhone/iPad via USB. In the Finder's Photos tab make sure "Photos" sync is ON and select all or selected albums. Hit sync a number of times until all photos are visible in iPhone/Pad Photos (might take a while with a large library).