I understand that some of the contact names are not showing in the Messages app. I know it is important to be able to see who has been texting you. Are you using iCloud for Contacts? If so, please Go to Settings > Your Name > iCloud > Contacts and toggle that switch off and then back on. Then close out of the Messages app and then reopen.
How to force an app to close on your iPhone, iPad, or iPod touch
Let me know if the contact names return in the Messages app afterwards.