There are three ways to solve this problem:
1. If it is your own apple id, you can retrieve your password by registering your email address or keeping it secret when registering. Your email address when you first registered was your apple id account.
If you can produce enough proof of purchase, you can prove that this mobile phone is for your own use. In this case, you can apply to Apple to unlock or reset the ID and password. (Note: Chinese mainland only supports licensed products) If it is an iPhone from other countries, it won't work.
3. Go to the repair shop: change the hardware information of the mobile phone and change the serial number and IMEI number to the number of the unbound server. Replace the hardware chip, and the iPhone series needs to replace the hard disk and baseband kit. It costs money to find a maintenance point.