If you’re using 2-step verification from Yahoo, you may have confused when you generate a password new device because Yahoo moved the App Passwords link to other location. I recently noticed it so I’m not sure this is new or not.
Go to https://edit.yahoo.com and login with your information
Look for Set up your second sign-in verification under Sign-in and Security and click on that link
Click on Generate app password if you want to get a specific password for a certain app.