What options for password ***** have you been shown when you try and reset your password?
Does yahoo offer you the option of texting you the code? Do you have a current mobile phone number on your yahoo account?
Ok it sounds like you have 2 step verification turned on which texts you every time you log in. You can turn that off but need your password ***** do so.
If you do not know your password ***** to this page https://login.yahoo.com/account/challenge/username and reset your password.
Once you have reset your password ***** the following to turn off 2 step verification.
Sign into your account here: https://login.yahoo.com/account
Click Account security.Under "Two-step verification," click the Off icon.
Once you have turned it off you should no longer need to enter a code when signing in.
If you need more help let me know.