If username and password are not matching, you can't login Yahoo mail account. Yahoo users must cross check the entered correct password or it may be forgotten password of Yahoo mail account so first of all, finding the reasons why username and password are not matching.
Reset Yahoo mail password
If you are entering correct password but that are not matching, you can change the password of your Yahoo mail account after that try to login with new login details of Yahoo mail account.
Spell check entered Yahoo login details
Sometimes, users type wrong username or password that's why they unable to login Yahoo mail so users must cross check the login details of Yahoo email.
Yahoo Login Details hacked by someone
sometimes Yahoo mail login details are hacked by someone that's why username and password do not match. In this situation Yahoo email users should immediately change the login details of their Yahoo email account.