Back up first.
Format Data erases the data on your phone’s internal storage. Use the correct ROM, an unlocked bootloader and a compatible recovery for your device. These steps are the project-provided installation flow; also check the notes for your release.
Quick pre-installation check
Confirm your device model and codename. Back up photos, files and authentication apps. Check the ROM package integrity and release notes. Ask your carrier how to restore your eSIM profile. Do not disconnect the cable during installation.