The thing about world building is that you CAN do it for years, and never finish. After all if you wanted to write a backstory of a world with the same level of detail that we have for the Earth how long would it take?
I can’t say how others do it but I tend to do my worldbuilding in stages. When I was starting to write my first book I wrote enough about the major powers, and enough of the overall timeline to have a basic idea about what was going on. I needed to know what kinds of tech they would have and stuff like that.
As I finished the first draft I realized I needed more so I gave it another pass and added many more details.
Around the fifth draft I did one more last long pass, I went into detail about all the major political factions within each power, enough that I could write stories set anywhere I wanted.
I did this in stages partly because I did not know what I needed until I got there. It was also helpful because worldbuilding is some of the most brain taxing work you will do, doing it all at once can be hard to impossible.