How can astronomers measure certain facts about the universe when it was just born and so long ago?
They infer rather than measure properties of the very early universe. What happened back to about 10 seconds is quite well known, not because it’s been directly “seen”, but because we can develop detailed models that we then test against observations. When the observations match the models, we can feel quite confident that we’re right. As a case in point: we can measure abundances of elements in the universe, and compare that to what you expect in our current nucleosynthesis model. The result- that the universe is 75% hydrogen and 25% helium- matches extremely well. As new data comes in, models survive or fail the test; if there’s a discrepancy, you have to come up with a new model that works (as for the accelerating universe, for which we haven’t yet really found a good model).