Hey jak.son48,
Thanks for using Apple Support Communities. While there isn't a tool that will compare different libraries, you could choose to import them to the library you want to use. Here's a guide with those steps: Import photos from another library in Photos on Mac - Apple Support
"In macOS Monterey or later, you can import photos and videos from another Photos library, as long as the library you want to import from doesn't have iCloud Photos turned on. When you import from another library, photos and videos will retain existing edits and most metadata is preserved.*"
After importing, these steps can help you look for possible duplicates: Remove duplicate photos in Photos on Mac - Apple Support
We hope this helps.
Take care!