In older, no longer supported versions of Microsoft's free email programs, you could add multiple accounts and then specify a default account for composing a new message.
How to Set a Default Sending Email Account in Outlook
The Mail app in Windows 10 still lets you add multiple accounts, though clicking the New Email button will open a drop-down menu with the account you want to send the message from.
If you have set up an account through Microsoft 365 or Microsoft Exchange, the server manages all information about the account, including your name and email address. However, if you have selected an IMAP account, you have more control over specifying the message display name.
Customize your display name for IMAP accounts by going to Settings > Manage Accounts. Select the relevant account and change the information as needed.