For me the best way to get into the flow is by directly getting back to where I left. If I take time to wake up, make breakfast or anything else I usually lost my ideas already and it takes me hours to get back to them.
Just writing it down, will help you remember. If not: You have the paper.
This is underrated. And, specifically...writing it down, with a pen or pencil. Typing it doesn't seem to have the same effect, even with some ritual of typing it into a fresh/separate document.
I used to use whatever cheap ballpoint was around, and I had terrible handwriting. But on a friend's recommendation I tried a fine point gel pen, the Uniball Signo DX 0.38mm. It's such a joy to write with and my handwriting is orders of magnitude more legible.
There's apparently a whole world of pens (and pen enthusiasts) out there: https://www.penaddict.com/top-5-pens
The only other software I usually have running on my work computer is a web browser.
You are far smarter than you think.
Learn to get into flow, and also figure out how to get your state back faster... Once you do, it is a super power.
Simple things like leaving your editor/IDE open, create the same situation you left. I personally use music + IEMs to help me block sound and focus. -30-35 DB off the IEMs, and +70DB off my music... yeah, I don't hear anything.
I learned the editor trick recently, though I'd probably done it un-intentionally for years. I stopped, and I was wondering what the inertia I was facing was. It is only 2-3m to get setup... that's 2-3m to lose my thoughts, etc.
Good luck.