problems with contacts
I have an iPhone 6S. A Mac with macOS High Sierra version 10.13.3. A week ago I noticed in my contacts and on my calendar that there were huge amounts of duplicate contacts (and on my calendar corresponding duplicate birthdays). My I phone was fine without duplicates and so was my iPad. I did the merge recommendation. It worked. I closed my contacts then reopened it and the duplicates were back. I did this numerous times. Then suddenly all my contacts on my iPhone disappeared. I went into the Cloud and they were all gone as well. So, I did the restore. Contacts are back on my iPhone...duplicates are back on my Mac and now half the contacts in Messenger show just phone numbers or the phrase Maybe: Jaime. WHAT CAN I DO TO FIX THIS. It is a recent thing. I checked and did updates but it is like a spinning cycle. I can't get the duplicates to merge permanently.
HELP!
iMac, Mac OS X (10.4.10)