Just got a little Yubikey scare after accidentally inserting the same wrong PIN for 3 times, the password dialogue showing 0 retries and even the gpg --edit-card command being unable to reset the pin:

Error changing the PIN: PIN blocked

The official docs make it sound like you'll have to hard reset your Yubikey, but this is not the case if you still have access to your admin pin:

Just use ykman to reset the counters:

$ ykman openpgp access set-retries 3 3 3
Enter Admin PIN:
Set PIN retry counters to: 3 3 3? [y/N]: y

and we're good again:

$ gpg --card-status | grep "PIN retry"
PIN retry counter : 3 0 3

Also unrelated, but - wow: I'm at 2535 signatures already.