If you enter the wrong PIN too many times, your device wipes itself as a security measure — this is expected behavior, not a malfunction.
Your funds are not lost: restore your wallet on the same device, or any compatible device, using your recovery phrase, then set a new PIN during setup. This is exactly why keeping your recovery phrase backed up safely matters more than memorizing your PIN.