→ Great great documentation about all this (probably better): https://github.com/drduh/YubiKey-Guide
Documentation for PIV: https://github.com/Yubico/yubikey-piv-manager/tree/master/doc
To manage the certificates: https://www.yubico.com/support/knowledge-base/categories/articles/unpair-yubikey-piv-login-macos-sierra/