One way to prevent duplicate contacts from being created is to make sure that your iPhone is set to merge contacts when you sync them with iCloud or another service. You can also use a third-party app like Cleaner to find and merge duplicate contacts.