How to make Mail not to open it's window automatically?
This has been an ongoing issue since I got my first Mac way back in 2014. There are a lot of window related issues with mail, but they haven't been resolved for years and probably never will be. Sorry to tell you you're going to have to get used to it. Another annoying problem I've experienced with every Mac I've ever used now is if you have a Mail message open in its' own window but not the main window and you click the Mail icon in the dock it'll open the main window on top of the message window. Intuitive!