The icloud had old contacts how do you remove them

4 years or more ago my wife and I shared our iPhone account. I have since move to Galaxy. Anyway the other day she got and update and it imported our 6 year old combined contacts. She is currently erasing the un-needed one and changing the incorrect ones. Once she has her phone back to what it should be how do we get the icloud to erase it's data and take the new data. This is not the first time this has happened, but I can't figure out how to change the cloud, because it's wrong and the phone is correct.
If she is editing the contacts on her iPhone, iCloud is configured on her iPhone and the contacts are associated with iCloud then whatever changes she makes on her iPhone will be reflected in iCloud.

Original thread: https://forums.imore.com/threads/the-icloud-had-old-contacts-how-do-you-remove-them.377859/