Go back to Settings and tap General > Transfer or Reset [device] > Erase All Content and Settings. If you turned on Find My [device], you might need to enter your Apple ID and password. If your device uses eSIM, choose the option to erase your device and the eSIM profile when asked.