A balanced equation is a recipe written in moles. 2H2+O2→2H2O says two molecules of hydrogen combine with one of oxygen to make two of water, and the same ratio holds for 2 mol, 1 mol and 2 mol, or for 10 mol, 5 mol and 10 mol. Like a recipe, it scales: whatever amount of one ingredient you have, the coefficients tell you how much of everything else goes with it.
The catch is that the recipe counts particles while a balance weighs grams, and different molecules have different masses. So the calculation runs through moles: grams of A divided by A's molar mass gives moles of A; times the coefficient ratio ab gives moles of B; times B's molar mass gives grams of B. Making ammonia from 28.0 g of N2, about 1.00 mol, gives about 2.00 mol of NH3, or 34.0 g. The equation must be balanced first, because an unbalanced one gives the wrong ratio.
Mass is conserved, but the coefficients are not mass ratios. In the water equation, 4.03 g of hydrogen reacts with 32.00 g of oxygen, a mass ratio of about 1 to 8, nothing like the 2 to 1 of the coefficients. And when a problem gives amounts of two reactants, stoichiometry from either one alone may predict more product than the other reactant allows. That is a limiting reactant problem: find which reactant runs out first, then calculate from it.
Think of it like this. Stoichiometry is a pancake recipe scaled up: if 2 eggs go with 1 cup of flour to make 12 pancakes, then 6 eggs need 3 cups and make 36. The recipe counts eggs, not grams, and a balanced equation counts moles, which is why you convert grams to moles before you scale.
Core idea. The coefficients of a balanced equation are mole ratios, so the moles of any one substance fix the moles of every other. Masses enter and leave the calculation through molar mass; they are never compared with each other directly.