Your Apple ID syncs all Safari bookmarks across devices through iCloud, so if you can log into the same Apple ID on both Macs, they will sync automatically. To check that the setting is on, go to Apple icon menu on the top left of your screen > Apple ID > iCloud and make sure there’s a checkmark next to Safari.
If you are using Chrome, log in to the browser with the Google account on both Macs — the bookmarks are synced by default. You can manage what you sync in Google Chrome as well, just go to the Sync and Google services menu in your Chrome browser’s settings.