The account lockout message happens after a series of failed login attempts. The lockout lasts for up to a day to help keep your account safe.
If you’re temporarily locked out but you weren’t having difficulty with your account login or password, someone else may have been trying to log in with your Yahoo ID. Usually this is someone accidentally entering the wrong Yahoo ID when trying to log in.
Yahoo is one of the most commonly used internet portals and email services. Many people who sign up create an ID based on their name. Someone with the same or a similar name may have a Yahoo ID very similar yours but is trying to log in with the wrong ID because they forgot theirs or typed it in wrong. They won’t be able to access your account without your password.