Upgrading MacOS worked for me!
Eventually I had no choice but to attempt a system upgrade for that old imac. In fact, it worked like a charm. No more problems with yahoo mail. I went up to 10.12, Monterey, i.e. one before the most current. I highly recommend if you are in this situation to spend a week listing EVERY password and service you did or might use, and making sure you have some kind of backup password record, and THEN do the upgrade.
You MUST have:
your apple ID and password, as well as your
computer admininstrator's password.
email passwords.
Without those, you would be in a world of trouble. I personally did not seem to have any problems with browsers remembering most other passwords. However, services you don't usually think about can suddenly ask for a new password because of any kind of change (think TV services, travel agents, etc. etc.). And if THEY make the slightest change to their web pages, your browser won't properly remember these passwords.
Good luck,
-TPC