<File> --> <Account Settings> --> <Account Settings> --> <Email> tab
*** more specifically, what is the actual account configured as an Exchange account?
My outlook email
My outlook email is listed and the type is Microsoft Exchange (send from this account by default)
Gmail is listed and the type is IMAP/ SMTP
yahoo is listed and the type is IMAP/ SMTP
Given your answers, the solution to what you want to accomplish "get rid of the Yahoo account log in issue but keep all the Yahpp data" is a simple one
#1 -Export the Yahoo mailbox to a PST file
Export or backup email, contacts, and calendar to an Outlook .pst file https://support.microsoft.com/en-us/office/export-or-backup-email-contacts-and-calendar-to-an-outlook-pst-file-14252b52-3075-4e9b-be4e-ff9ef1068f91
#2 - When done, add the exported PST file to Outlook and make sure everything exported correctly. That's done by going to
File --> Open & Export --> Open Outlook Data File --> browse to the PST file and select it so it's added to Outlook
#3 - From the Outlook Nav Pane (left panel otherwise called the "Folder List" check the folders in the data file and make sure it has everything contained that you want. If you happen to see a folder that appears empty
a) with the folder selected, click on the <View> tab on the Ribbon
b) click on "Change View" - you should see the same options as shown in the screenshot

c) click on IMAP messages and / or Hide Messages (sorry, its been a long time since I last tested this so forget which of the two actually controls things). You missing items should now appear
#4 - Once you are happy that hte PST file has all your data, just a matter of removing Yahoo from the Outlook profile
File -- Account Settings -- Account Settings -- Email tab
*** select the Yahoo account --> click on<Remove>
If you get an error saying that you can't remove the account because the OST file for the account is set as the default data file, go to
<File> --> <Account Settings> --> <Account Settings> --> <Data Files> tab
*** select another data file and click on "Set as default" at which point you will then be able to remove the Yahoo account
All done 😊