If you have a Google account signed in and "Find My Device" enabled, you can remotely erase the phone from the Google Find My Device portal.
Warning: modifying locks can void warranties and may be illegal if not owner-authorized. Proceed only on property you own or have permission to modify. h4311 lock remove ftf
For official support, Sony recommends using the Xperia Companion computer application to perform a "Software Repair," which achieves the same result without needing third-party tools. If you have a Google account signed in