If your two-factor authentication (2FA) codes are not working the most likely problem is that the device you have installed the 2FA app on has the wrong time. Please make sure the clock on your device is correct. When you enter a wrong 2FA code on LocalBitcoins you can see the time of our server to compare with your device.
Restore two-factor authentication from backup
When you activated mobile based 2FA for your account you were asked to write down a backup code. If you have this code available you can restore your two-factor authentication.
If you've lost your phone or otherwise can't get to the 2FA app or your paper codes you will need to put in a two-factor authentication removal request to remove 2FA from your account. For security reasons it takes us two weeks to process this request and we can't speed this up.