How to find a backup of my iPhone contacts? My phone accidentally was dropped in water. I tried to sync it on my Mac with iTunes to save my contacts. Next day I connected it to my Mac again and all the contacts were gone.

I have tried libraries/mobile sync. I located the backup folders but it only has 4 contacts. I need my old contacts and I have tried iphonebackupextractor. But it also shows only 4 contacts.

Were can I locate my earlier contacts of the first sync? Or has it been overwritten the earlier contacts?
On your Mac, the backups are stored in ~/Library/Application Support/MobileSync/Backup/

This is covered in HT4946: iTunes: About iOS backups

If iTunes doesn't show an earlier dated backup (sometimes it saves off a backup when you upgrade from one major iOS level to another), you would need to erase and restore the Backup folder from a Mac backup (perhaps Time Machine is turned on) to get that older backup of your phone.

Also, check to see if iCloud has backups of your device. It stores several days worth of backups, so don't delay to check there in case ongoing backups of the now empty phone would erase those older backups with the data you seek.