If you lost the contacts, and you also did not backup them before.
I think you can try data recovery tool. usually, they ca help you get back lost or deleted data from your phone's memory, but remember , don't add more data to your phone after data loss.