I have bought a couple of Yubico 5 security keys, which work with modern ssh servers, and also with Githup (and lots of other web app).
Below is my recipe to create an ssh key with the secret stored on the Yubico secret key.
I am using Ubuntu 22.04 on both desktop and server - it works for me.
Update 2023-07-05: It turned out that I often had issues, I have now found out why: the opensc component was missing on my workstation
do the following to fix it