I keep post-it notes everywhere. When I have an idea I jot it down & stuff it in my pocket. At the end of the day I place the pile of notes on my desk. The next morning when sit down to write (or more recently edit), I have all the ideas in one place. Most I throw out. Usually 1 in 10 is a gem.
*Bonus*: always remind yourself that thinking is part of writing. Actual typing of text is just a sliver of writing. So, shower thoughts, walking thoughts, random thoughts in the day about your project *is* writing. Text yourself those thoughts (or get a dictation app)