The same picture saved from a chat, again from mail and once more after an edit: libraries fill up that way. Photos can find the doubles for you.
Photos > Collections > Utilities > Duplicates
Merge > Merge [number] Items
Each set shows the copies next to each other with a Merge button. Merging keeps one good version and moves the rest to Recently Deleted.
My approach would be to do a handful first and look at what it kept before running through the whole list. It is a low risk cleanup, but photos are the one thing people really miss.
If you don’t see a Duplicates entry, there is probably nothing for it to show yet. The scan runs in the background and a big library takes a while, so look again later, ideally after the phone has spent a night on the charger.
Don’t expect miracles. It looks for duplicates, so five nearly identical shots of the same sunset stay five photos and you still have to choose by hand. Space is also not freed right away: the removed copies sit in Recently Deleted until that album is emptied, which is also your window to change your mind.
Further reading: Merge duplicate photos and videos on iPhone
Going deeper: Guide: Immich on Unraid, back up the photos on your iPhone automatically