The subscript is not decoration
Percent composition asks what share of a compound's mass one element brings: . Weigh the X atoms in ONE formula unit, divide by what that whole formula unit weighs, and multiply by a hundred. Notice it needs no sample at all — a speck of water and a lake of water are both 11.1 % hydrogen by mass. It is a property of the formula, not of your beaker.
The trap that eats marks is , the subscript: the number of X atoms per formula unit. In , hydrogen's contribution is , not . Forget it and every hydrogen percent comes out exactly half right, which is the most expensive kind of wrong. Two free checks: an element's share can never exceed 100 %, and all the elements' shares must total 100 %. If your oxygen and your hydrogen add to 94 %, something upstream is lying to you.