The master copy for Contacts is one or more email accounts. If you deleted an email account the contacts associated with it will go away.
Contacts will not be in iCloud unless that is where you saved your contacts, but they may sync to iCloud. However, contacts will never be in an iCloud backup, only iCloud sync.
Go to Settings/Apps/Contacts/Accounts. At the bottom is Default account. This is where all new entries will go.
As I realize that the difference between sync and backup is not obvious, I offer the long explanation:
iCloud+ has 2 independent functions. iCloud backups, and iCloud sync. It’s confusing because they both have the same name prefix. But they have no connection with each other. Go to Settings/[your name]/iCloud. You will see a bunch of switches (with iOS 16 or later also tap Show All). When you turn on a switch that data type will sync to iCloud. If you do this on multiple devices that share an Apple ID the selected data will sync to all of those devices.
You can also turn on iCloud Backups. This will back up your phone every night if the phone is plugged in, connected to Wi-Fi and locked.
But note that these are independent functions; anything that you sync by the first method will be excluded from the iCloud backups.