If the same picture appears twice in your iPhone library, open Photos, then Collections → Utilities → Duplicates. The collection lists photos and videos that Photos has flagged. If it is missing, Apple says the phone may still be indexing or may have found no duplicates. Check again later if the library was recently imported.
Start with a pair you recognize
Suppose two copies show the same café sign from the same angle. Open both before merging. Look at the edges and any visible edits. Keep them separate if one crop or edit serves a different purpose. When a pair is safe to combine, choose Merge for that group and confirm the number shown.
Check what remains in the library
Open the retained item and zoom in on the detail you wanted to keep. If you also need a specific unmodified file for a project, make a separate copy of it before merging. Try another group only after checking the first result.