How do we know what occurs when dihydrogen reacts with dioxygen?

${H}_{2} \left(g\right) + \frac{1}{2} {O}_{2} \left(g\right) \rightarrow {H}_{2} O \left(g\right) + \text{energy}$