Toggle Contacts in iCloud off and then on again
Your contacts have not disappeared, they are just not showing up properly. Try toggling Contacts in iCloud on and then off again to fix it. Here's how to do that.
Step 1: Launch the Settings app on your iPhone and then tap on iCloud. For users who use iOS 11 and later versions (including iOS 11.3), they can find iCloud by going to Settings > Your User Name > iCloud.
Step 2: Find "Contacts" and turn it "ON" if it is "OFF." When asked, tell iCloud to "Replace your Contacts." If it is already turned "On" toggle it "Off" and then "On" again.
Step 3: If asked, select "Delete from My iPhone." Don't worry, your contacts are still in iCloud and they will come right back to your iPhone.