Good Dungeon Masters (DM) are prepared. “Being prepared” means something different to everyone. Even so, every DM can benefit from really knowing the facts of their homebrew campaign, one-shot, or pre-made module. I want to stress right out the gate that good preparation does not preclude clever improvisation. I argue that by establishing your facts you strengthen your ability to pivot and improv, even when (especially when!) the players want to try something you hadn’t conceived. Set yourself up for success session-to-session with mastery over your campaign’s core facts, and thus achieve flow.
There are two broad categories of facts. Facts you need to know and facts your players need to know. These tend to overlap. I write both types of facts in a sort of abstract, isolation. Most facts I jot down are standalone from a specific person, place, or time. I may tag them with an NPC’s name or some other modifier, but that’s more of a suggestion to myself than a hard rule. When it comes to quick facts and secrets, I don’t want them to be cluttered with a scenario or “if this, then that” instruction. That is the heart of this advice — facts and secrets are floating bits of information you weave in as you go!