The cases environment draws a single large brace on the left and lays out one line per case, each written as "value & condition". It is the same table machinery as a matrix, with different decoration.
Step 13 of 17 of the LaTeX tutorial. The formula of the step, |x| = \begin{cases} x & x \geq 0 \\ -x & x < 0 \end{cases}, opens in a live playground you can edit.
Write a LaTeX or mhchem formula and see it drawn as you type, save it as an SVG that opens again, learn the notation step by step, and practise it with graded exercises. The tool needs JavaScript, because the formulas are drawn in your browser.