To configure address book you need a webmail account and iCloud account .
The Apple ID is kept same as the web mail address ( could be gmail account or any ) .
In system preferences > iCloud > the user must be signed in with Apple ID .
In system preferences > internet accounts > for web account > all the boxes ( mails , contacts , notes & calendar are checked ) and in iCloud - all boxes are checked except back to Mac .
Open mail application when you receive a mail from some one click on drop down arrow of mail address and click on add to contact it will be added .
In your Mac if this window doesn't appear either your apple mail application is corrupted or you are using some unidentified apps like some kind of cleaners , anti virus , softwares , that has corrupted the address book or mail application you can use https://etrecheck.com/
It will find out and give the results for the cause .
Sometimes , a new user account is created and then in this you have to configure mail application and address book and tested .
Mails , contacts are stored on the web server and iCloud server and they will get downloaded when applications are configured , some prefer only time machine to restore contacts , but configuring the applications with server is more convenient and it always works ( in case even the hard drive is erased and the OS is installed , just an example the notes , contacts , mails ( for IMAP accounts ) never vanish from the server , once the Mac is connected to the wifi and applications are configured , each and every contact gets downloaded for sure ) .