After trying many things and nothing working I find out yahoo up their secruity big time. This is how I was able to fix my issue and hope it works for you.
1: delete account off iPhone
2: restart phone
3: log in to yahoo account through browser.
4: select allow apps with low secruity under your Yahoo settings on the website.
5: create an account key by following the instructions. You will be asked to download the Yahoo App from the App Store. Download it once your done u can delete it.
6: once u have created and verified you can add your account to you iPhone through your phone settings like you normally would have.
7: once u add it your account key will pop up verifying it’s you adding this account to your iPhone. You select yes and boom your done! It’s working for me so far and I’m on IOS 11.2.5 on an iPhone 6s Plus.