The default email account is set in Settings > Mail > Default Account (at the very bottom of the list). When using email from another app via the share sheet, or creating a brand new email in the email app, this account should be automatically used. If you reply to another email (however indirectly) the account that received the email will be used to send the reply.
From your description, it sounds like Apple Mail may also remember if you’ve always sent/received emails using a single account before, and (helpfully?) decided to use that account.
I’ve never heard of this before, and have no idea how to bypass it. Maybe, if you make sure you change you From address/account manually and they reply using that accounts address a few times this behavior will revert back to the default account. No idea.
For the few accounts that I absolutely have to keep isolated from each other, I use third party mail apps.