Hi,
Here is how to transfer contacts from iPhone to computer.
Step 1. Merge your iPhone contacts with iCloud
Before doing anything else, open your iPhone and go to Settings > iCloud. Then click to turn "On" the "Contacts". At this time, you'll see a pop-up message asking if you want to merge the contacts. Choose "Merge". Then just wait until the process is complete.
Step 2. Log in your iCloud account on computer to export your contacts
After the first step, switch to your computer and go to iCloud.com. Sign in with your Apple account.
After entering iCloud, click "Contacts" to open your address book. Continue clicking on the cog icon at the bottom left and choose "Export vCar...". Then you've transferred your iPhone contacts to the computer.