I build plots and world on the fly.
My approach is the MOVIE approach. I keep notes on each character (just one document, with for example "JOHN:" as a heading for a character), and for each SET. In a movie this is a shooting location, like JOHN's apartment, his workplace, the diner, the basketball court, a hospital exam room, etc.
My notes are not particularly well ordered, and notes may be in different orders for different characters or sets. They are not a narrative, but if I need the names of John's parents, they will be under "JOHN:", and under "Parents:". The same thing for John's apartment, if I ever gave his apartment number, it will be in there. These are separate documents, one for all my character notes, another for all my sets.
Some of this is tied to the way I write; I proof and adjust what I wrote in the last session, and the last thing I do before I put something to bed is see if I invented anything and need to add to my notes.
Sets are slightly different, in that I do more world building and may even sketch out like a neighborhood or floor plan if the writing demands it.
But also like in the Movie Industry, I am sure you have seen "Making Of" documentaries where we see that the apartment (that looks whole on the screen) is actually just two and half walls, no ceiling, and a lot of overhead lights and mics and cameras.
Film professionals only build as much set as they need to give the illusion of completeness.
That is my approach as well, both to characters and sets. I don't build Marsha's past, her childhood traumas, her lifetime sexual history, unless I need that to justify something I will write about.
The same thing for physical settings. I may do some world building about the places my characters live, work, and must visit, but if it doesn't appear in my story, I don't build it.
Some of those notes might be on distances and such, it takes 30 days of running to get from Point A in my fantasy world to Point B. In one story I did have to devise a map, but it was mostly blank and extremely rough; basically labeled cities as points, a mountain range, a river, a lake, on a piece of graph paper.
Other times I have skipped making maps altogether, and just decided my map looks like Washington State, or Greece, or Italy, or Eastern Canada. I don't say so, but that's what I am using, including city locations. What could be more natural?
World-building can be its own fun entertainment, but usually I'd rather work on my story and my characters. Do as much world building as you like, but at some point I feel we aren't writing a story anymore, we are just building the equivalent of a model train set. Maybe even dithering and procrastinating instead of writing a story.
My approach is to invent and build on the fly what I need to tell the story, but to also be diligent and for the purpose of consistency write notes on what I built, or at least pick a real physical location as my model. e.g. My own first apartment, my own hotel stays, etc.