See the information in Hide duplicate contacts on iPhone - Apple Support including the following:
In the Contacts app
, link contact cards for the same person in different accounts so they appear only once in your All Contacts list. When you have contacts from multiple sources, you might have multiple entries for the same person in Contacts. To keep redundant contacts from appearing in your All Contacts list, contacts from different sources with the same name are linked and displayed as a single unified contact.
and
If two entries for the same person aren’t linked automatically, you can unify them manually.