Mods, I am sorry this might be wrong place and I know you will move it as needed - apologies if this is a pain, I didn’t know where best to write this to help people?
Thanks for posting this — it was the right advice in 2022, and a note for anyone finding it later: it’s no longer necessary. Since Mailspring 1.14.0 the Outlook.com / Hotmail option signs in with Microsoft’s OAuth flow in your browser, the same way Office 365 accounts do, so there’s no password or app password to create and two-factor prompts just happen on Microsoft’s page. The setup steps are at Adding an Outlook.com, Hotmail.com, or Live.com account — Mailspring Documentation.
If you set up an Outlook.com account with an app password back then and it’s still working, you can leave it alone. If it ever starts failing to authenticate (Microsoft has been steadily switching off Basic Auth for SMTP as well), remove the account and add it again with the Outlook.com / Hotmail option on a current 1.24.x build. Anyone who signs in successfully but then sees an IMAP or SMTP authentication error should check the “Let devices and apps use IMAP” settings described in Connecting to Microsoft Office 365 and Outlook.com — Mailspring Documentation.