How do i recover my PUK2 code

PUK code is not related to the phone, it's related to your SIM. Only your network knows your code. You have to contact them somehow. If you get a new SIM, the phone will not ask you for a code anymore.