Comparing both the screen shots , there is no webmail account configured ( could be gmail or yahoo ) .
The Mac user must create an Apple ID that is kept same as webmail address ( could be gmail address ) to work smoothly .See this article Set up iCloud - Apple Support
And another article Add contacts from iCloud, Facebook, and more to Contacts on Mac - Apple Support
If you keep contacts in Internet accounts—for example, iCloud, Google, Facebook, LinkedIn, or Yahoo!—you can use the accounts in the Contacts app, and access all your contacts in one place.
Note: An Internet account isn’t necessary to use Contacts—you can add your family and friends directly in Contacts.
If you are directly adding contacts ( as family friends in that scenario they are not showing in the first screen shot and you have edited them and removed their street addresses , mail address or mobile numbers etc and in the second screen shot they are visible .
And for duplicate contacts , click on card > look for duplicates , if they are found merge them .
I am using some web mail service the contacts shows perfectly and I cloud account and have to click on All contacts .
And in system preferences > internet accounts click on web mail account the contacts box and rest of 3 boxes are checked same with iCloud account except back to my Mac is always unchecked and if iCloud is clicked all boxes should show as checked except back to my Mac .