How to wipe a phone with lost code?
There are two possible ways from here:


Hard Reset: This will wipe all data stored on the phone, see this on how to perform a hard reset using hardware buttons.
Try something like Dr.Phone software to remove screen lock.