Take help of a web browser and enter in www.icloud.com with the apple id and password used in an iPhone , the contacts that were saved in will be visible select the desired contacts and click on gear icon in the left bottom corner and click on export as v card .
Open finder , click on downloads , right click on .vcf file and open with contacts .app( default ) .
The address book will get opened , a pop up window will appear stating are you sure you want to add number of cards , click on add .
Again open your address book the contacts that were in the iPhone will be transferred under the section “ All contacts “ in the Mac address book .
Sign out from www.icloud.com used with Apple ID and password for an iPhone .
Then enter in www.icloud.com with the apple id and password used in the Mac , click on gear icon and click on import as v card all the contacts will be transferred in the iCloud server , click on create group on the bottom right corner an untitled folder will be created in the side bar and the contacts from iOS are all transferred to the iCloud server account .
See some articles iCloud: Export a contact as a vCard from iCloud Contacts
iCloud: Import a contact into iCloud Contacts
iCloud: Create a group in iCloud Contacts
The contacts are in " All contacts " , there are 20 groups names " A " , " B " , " C " .............and having different contacts in each group .
You can select all contacts ( use command and A keys ) , copy them ( command and C keys ) , and paste over the " All contacts " ( use command and V keys ) , or drag and drop desired contacts from each group in " All contacts " , then connect a printer https://support.apple.com/en-in/guide/mac-help/mh14004/mac
But make sure you print from address book application / contact application that is synced with iCloud .
Also you can create work / home groups see the article https://support.apple.com/en-in/guide/contacts/adrb3280fe91/mac
Read this also to move contacts https://support.apple.com/en-in/guide/contacts/adrbbb1811b7/mac
You won't loose any contacts as they are synced with iCloud from any group unless you delete them , its just dragging and dropping in the address book ( from one group to another or you move all of them in a single group or in " All contacts " .
![](https://discussions.apple.com/content/attachment/be452663-4e4d-4529-a9bb-78413ff8dcd5)