"The road of excess leads to the palace of wisdom," said William Blake, and I know it is true in at least one case. I don't always know when to stop doing research for a project, or how to deal elegantly with the feeling of coming across valuable research after the project is already closed.
The first of these problems, the perpetual research treadmill, is something that's afflicted a couple of other writers I know. It typically manifests around some big, ambitious project which they don't feel comfortable embarking on until they have all the subject-matter ducks in a row. I'm reminded of the way some people overpack for their vacations, and inevitably end up using less than half of what they take. So they read and take notes and world-build, and that in turn inspires more reading and note-taking and world-building, and the weight of that welter of detail presses them down until all the air is forced out of their lungs.
I am certain a sizable percentage of this behavior is "constructive procrastination", where you avoid actually writing the thing by way of any number of totally justifiable pretexts. Don't feel bad if you feel seen. You've done it, but I've done it too, and most everyone who's ever written down a reading list for their work has also done it.
I wish I had a nice, magic criterion for how to know when to stop doing research. I don't. What I do have is a sense of my own impatience. At some point I just want to start getting something down on paper, even if it's just a first couple of chapters for the sake of finding voice and establishing tone and setting scene. It'll all get rewritten anyway; it might as well help start the wheel turning, and give you some sense of when the research you're doing is approaching diminishing returns.
The other one that's a toughie is the heartbreak of coming across good research material for a story after you finished writing it. The book is already out there, but here you are with this wonderful gem of an insight, or a piece of history, or some factual nugget that you know would have changed thins for the better. Short of writing a new edition of the book, the only thing you can really do is file it away and move on. You can only ever write a story in the present moment, and perpetual revision of an already-released work (barring things like cleaning up typos) takes energy away from exploring new things.
You have to start somewhere, and you also have to stop somewhere. You will never find the exact right time to begin or conclude your labors, but you can tack closer with each successive project. I do strive to make the best book I can. But I am perfectly content to sign my name to something that is the imperfect product of a moment in time.