I started a new passion project last year. I don't know if it counts as a huge project, but I could tell going in that it would be the largest and most ambitious solo project I've ever taken on. Given that this is a project that nobody is paying me for, I have the luxury of not having to give any deadlines, so depending on your situation, your mileage may vary.
Firstly, whenever I encounter a bug or an idea that I don't want to interrupt my flow, I make a note of it. I'm currently using a Github project board for this. You don't have to use any complicated features to do this, it can be essentially used as a todo list so that you keep track of the things you want to implement. These things should be broken down into small achievable tasks.
I have embraced the idea that this project might take me literally years to finish, or it might never truly be finished. There are a great number of successful software projects that are never finished! Linux, for instance! I've given myself the odd fleeting thought to how much time it would take for a v1.0.0, but never tried to calculate it. I've accepted that it'll be done when it's done. Especially given that I don't know if I'll be too busy to work on it in a few weeks time.
This way, by not worrying about when it'll be done, I'm finding myself in that flow state of just working on the thing that I want to work on right now.