Generally, temporary error code arise due to corrupted registry but apart from this, there are also some other primary cause of temporary error 2 could be like -
1. Yahoo mail server problem.
2. Full of browser caches.
3. Your unsupported Yahoo mail browser.
4. When you are logging Yahoo mail from many devices.
5. Your device on which you are using Yahoo mail is infected with viruses.
Also read - https://www.completefoods.co/diy/recipes/what-is-yahoo-temporary-error-code-2