I have found this to work well for myself.

Come up with a general theme for your world, a basic template. Shouldn't take more than a page.

Then work from an outside in approach, start with the setting for your first adventure, then grow out from there. Build new towns, traditions, dieties, ect, as they become relevent to your game. If something comes up a lot, flesh it out more.

But here is the trick, each week also design something not related(at least direct ally) to the adventure at hand. So for the session this week, you might design the hamlet of twoson and the dark lightning god that the cult there worships, but you might also design, and introduce, the basic calander for your world that day. On your next session you could design the town of Threed and how the undead work in your world, and also introduce the history of a recent war the shook the kingdom.

In this way you organically flesh out your world over time, but also don't get these huge missing patches because something didn't come up.