- Head to iCloud.comm/find with another phone.
- If you are asked, get yourself signed in with your Apple ID.
- After that, at the top of the browser, choose All Devices.
- Choose the device you wish to erase.
- Then click Erase [device] and it will erase your phone and its password.
- When that is done, you can either restore from a backup or set up as new.