This article explains how to enable two-factor authentication (also called 2FA or two-step verification) for your Yahoo Mail account on your desktop computer.
How to Protect Your Yahoo Mail by Securing It with a Yubikey
To add a second layer of authentication to protect against suspicious login attempts:
Select the Account icon and choose Account Details.
Select Account Security from the menu on the left.