If you need to perform a hard reset on Android (restore factory settings) , you will lose all data on the internal disk, including contacts. You can save them by synchronizing them with a Google account or export to a SIM card or external drive.
Instructions: how to backup contacts on Android
1. Go to phone contacts.
2. Click the option button, an additional menu will open in which you must select the “Import / Export” option.
3. In the menu that opens, select the place to which you want to export the contacts: to the SIM card or to the drive (SD card). You can also choose “Send visible contacts”.
In the first case, the contacts will be saved on the SIM card, and in the second case – in the root directory of the memory card. If you want to send contacts, you can send them by mail, Vkontakte, via Bluetooth etc.