Smart card-only login
Maybe you could follow the instructions here to set up "Smart card-only" mode. I had tried it myself and summarized some key points as follows:


Make sure that you have paired your Yubikey with macOS. You could run sc_auth list in Terminal to check;
After installing the profile, you'd better plug out your Yubikey and log out the current admin user.
Then plug in your Yubikey, just wait a second. The password input will change to PIN input. If Yubikey was plugged out, there'll be a note probably says"Smart card is needed".


Hope it helpful~ ^_^