ECBackup app provides features through which you can create a backup file to save your phonebook to save your phone numbers from deletion without having to access a computer.
The top open-source alternatives to ECBackup
are Nextcloud Contacts.
One of the criteria for ordering this list is the number of mentions that products have on reliable external sources.
You can suggest additional sources through the form here.