My iPhone 7 lost the contact names on my favorites. I just have the numbers. Under contacts I have the names but no numbers. Help
Contact names are part of iOS backups, so you could simply restore from your last backup.
Before doing that, you might check that your contacts don't sync with an online service. If that's happening - you might need to fix the sync or fix the data store in the cloud since it might be pushing down "deletion" records which would happen as again as soon as you restore a backup.
Basically, it depends on where your contact data lives permanently. The steps to fix vary if you only have contacts on the phone, sync them to a computer or sync them to the cloud or some combination of all of the above.