When you set your recovery options, you made a mistake by entering your Yahoo account as your recovery email address, instead of entering a different one. That's why Yahoo has sent you a security code to the account you're trying to access.
There are some solutions that you can try to recover your account. Check out this article to see the different recovery methods available for a Yahoo account. Unfortunately, if you don't have access to an alternate recovery option (phone number), account recovery may be impossible. The last solution if you know your password, is to try logging in from a familiar browser, device and location.