If this is what you’re asking: you cannot sync photos between two desktop computers. You can only sync between a desktop computer and LR Mobile on a device or the web.
To work on the same set of photos on two different computers that both have LR, put the photos and a catalog on an external drive and share that between the two computers. Make the external drive the same drive letter or same device name on both computers, so you don’t have to Locate Missing Folders/Photos every time you swap between the two computers, and make sure you have a backup of the entire contents of the drive, catalog and photos, somewhere else, so if you drop, lose or otherwise destroy the external drive you still have everything. I backup one external drive to another external drive every night and at times during the day if I’ve just copied a set of important photos, so I always have a backup copy, and can start using that backup external drive as a new portable drive to swap between my two computers if the main external drive is no longer available.
You are indirectly referring to Syncing catalogs between two Computers which is not possible.
Best way is to keep your images and catalog on an External drive and share the catalog
Though your collections(if shared) can be accessed via Lightroom mobile on your Mobile devices.See Adobe Photoshop Lightroom Help | Sync Lightroom desktop and the Lightroom mobile app
Similar thread How do I share a LR catalog between computers?