My workflow is to keep the notebook as thin as possible, and concise enough to fit in my brain. I explore the problem space and write some functions and data structures directly in the notebook, but as soon as I can, I refactor them into separate modules that I then import.
If I don’t, the notebook quickly becomes bloated, I start getting paranoid about stale cells and lose track of what I'm actually trying to do.
Ideally the notebook’s sole purpose is interactivity, as kind of a quick-and-dirty frontend when it's not worth it to write an actual frontend, everything infrastructural gets moved out.