I have had good experiences using Photosweeper though Ventura's Merge Duplicates feature is easier to use.
However, I'd urge extreme caution using that feature as it seems to have nearly destroyed my library recently. I had tens of thousands of duplicates from corruption to the library, probably due to iCloud bugs, and the merge feature mostly deleted the wrong copies of photos. Thank heaven for undelete.
By "wrong" I mean given two jpegs with the same dimensions/pixel count it would often delete the far larger version and keep the smaller (presumably far more compressed, lower quality) version. I spent several hours on the phone with supposedly high-level creative media support reps and no one could/would tell me what Apple means by "higher quality" which Merge supposedly preserves, except that the last rep insisted that if two files had the same number of pixels they had to be the same quality, even if one is much more compressed/smaller, which is dangerously false information. (Dangerous at least if you care much for family photos.) It's possible there's some other variable that affects quality in jpegs but no one could suggest anything and simply insisted on mathematically impossible answers.
Also, this is partly a matter of preference but given two equal-pixel images Merge seems always to keep the *newest* dated copy rather than the oldest, no matter how small/compressed the file (not a matter of preference). If like me you often back-date scans or emailed photos to match the time they were taken this is not a good feature. I'm not sure when anyone would want to keep the newer but worse-quality version of a file.
Based on phone support Apple might repeat here "but we keep higher quality"--*maybe*, but they owe us an answer to what they mean by "quality", and none has ever been offered except "more pixels" (or HEIC format), which is insane. (I should add, some support reps were outstanding and rebuilt my corrupt library but couldn't fully fix it.)
Sorry, probably more info than you want to know and should probably be it's own post. But I'd check carefully what Photos proposes to merge if you use that feature. And be sure to keep (and backup) full-size copies of all photos on your computer outside the Photos app because like all apps this one has bugs, and some are pretty awful. I'm still recovering from this snafu, two years on, but think I'll finish dealing with it soon.