Bethesda has published a fairly exhaustive telling of Starfield's backstory going back almost 300 years before the events of the game.
Over on Starfield's official website, you'll find a new section titled 'The Story So Far', followed by a timeline of key events from 2050 all the way to 2328, just two years before the campaign setting begins.
Until now, we've known only that 20 years before Starfield's story begins, there was a war between the Settled Systems' two most powerful factions: United Colonies and Freestar Collective, and that there's an uneasy peace between both sides as the campaign kicks off. Now we know a whole lot more about what happened before the event of Starfield, including when humans first inhabited Mars and became a space-dwelling species.
As foretold in official Bethesda lore, humans first arrived on Mars in the year 2050 and began fully living in space 50 years later. The United Colonies were established in 2159, just a few short years after humans made their way to the star system Alpha Centauri.
The Freestar Collective is eventually formed in 2189 in opposition to The United Colonies' perceived attempt to expand its borders into the Narion star system, sparking the conflict that would lead to the big war preceding the main campaign. There's a lot more that happens in-between the formation of Freestar and its war with The United Colonies, and all of it's detailed in Bethesda's official account.