Hello Hanksart,
Welcome to Apple Support Communities. It sounds like you're having trouble with your contacts being deleted. We are happy to share information that may help.
First, check to make sure that your contacts are being synced with iCloud rather than a third-party account: Manage and delete contacts on your iPhone, iPad, or iPod touch.
Also, take a look at the suggestions here: If your iCloud Contacts, Calendars, or Reminders won’t sync.
To restore your contacts, try these steps: If you accidentally deleted your calendars, bookmarks, or contacts from iCloud.
If you need more help, please provide the following details:
-You mentioned this happens when you connect your iPhone to your computer. When you connect to your computer, are you attempting to sync data from iTunes, import photos, or something else?
-After the contacts are removed from your iPhone, are you still able to view the contacts on your computer?
Take care.