Duplicates contacts ( they will be under iCloud section > in All iCloud ) are shown in Mac address book as well as in iCloud.com if these duplicate contacts are selected from Mac address book use command and A keys and click on command and delete key they will be deleted condition they must be in series and not randomly placed , as important contacts will also be deleted .
If they are randomly placed select important contacts that are not to be deleted in on my Mac section , just select use command and A keys , copy use command and C keys and paste use command and V keys .
The duplicate contacts can also be in various groups in iCloud.com Create a group of contacts on iCloud.com - Apple Support created and they will be shown in All contacts of Mac address book ( see the first option ) .
You need to find out duplicate contacts from address book from various groups , All contacts , All iCloud and another way is create a group name as say duplicate contacts 1 find out all duplicates and club in this folder and finally delete this folder it will be removed from address book / iCloud.com
The article posted if you see duplicate contacts after setting up iCloud is for duplicate contacts in All iCloud .
Note : duplicate groups can't be selected to delete individual group Delete groups and Smart Groups in Contacts on Mac - Apple Support
See this thread also I have duplicate contacts in my iCloud ac… - Apple Community
The duplicate contacts will be deleted from iPhone also that is synced with Mac .