Yubikey is closed-source and people that care about privacy shouldn't use it. Instead i will provide three best open source security keys for you.
OnlyKey is an open source alternative to YubiKey. OnlyKey natively supports: a hardware password manager, multiple two-factor methods (FIDO2, TOTP, and Yubico® OTP), passwordless SSH login, and OpenPGP.
https://onlykey.io/
Solokey - The first open-source FIDO2 security key: Protect your online accounts against unauthorized access by using the most secure login method. Built with Trussed®.
https://solokeys.com/
NitroKey - Both hardware and software are open-source, free software and allow independent security reviews. Customisable, no vendor lock-in, no security via obfuscation, no hidden security issues!
https://www.nitrokey.com/