Hey there boyo2021,
Thanks for reaching out to the Apple Support Communities. We understand you're having issues with your contacts unexpectedly disappearing from your iPhone, and we'd be happy to help.
To get started, if you log into your iCloud account from a computer at the following resource, and click the Contacts icon, are you able to see your contacts listed here: iCloud - Apple
If so, check out the steps listed in the resources below that may help.
If you don't see your contacts listed on the iCloud website, by chance do you have any other email accounts signed into your iPhone? If you do, let's check if your contacts may be syncing with another email account with the steps listed here: Use other contact accounts on iPhone - Apple Support
We look forward to hearing back from you.
Have a great day!