Hi, I'm Ashik. Welcome to JustAnswer. I'm reviewing your question now, and will post back with your reply ASAP
How did you delete them ? Go to www.icloud.com
Sign in to your Apple ID and do you see your Contacts there ?
You have three options in here. If there is a copy on iCloud available (in Archived) , then you can restore them from iCloud. Go to www.icloud.com on your computer
Login to your iCloud account with Apple ID/iCloud ID and password ***** used on your iPhone.
Then click on Settings. Under Advanced section in left bottom, click Restore Contacts. Look for a most recent backup there. Select a date and click Restore. This will restore the contacts to that date.
Another option is, download this recovery application D.Fone on your computer --> https://drfone.wondershare.com/iphone-data-recovery.html
Then connect the iPhone to your computer. Open Dr.Fone and run a scan with it. It will allow you to recover deleted contacts and stuffs.
Final option is, if you have iCloud backup available then you can erase the iPhone and restore your iPhone to that backup point. This will not work if the iPhone has made any updated backup after the deletion. On your iPhone, go to Settings > iCloud > Backup and what is the backup date there ?
If you have any difficulty on following the steps above, please let me know and I will continue to help you