Volume Is Not Mass
A cup measures how much space an ingredient takes; a gram measures how much it weighs. Because ingredients pack differently, a cup of flour (about 120 g), a cup of sugar (about 200 g), and a cup of water (about 240 g) all have different masses. You can only convert cups to grams accurately for a specific ingredient.
When Volume Works
Volume measures are fine for liquids and for recipes where small variation doesn't matter — soups, sauces, most home cooking. They're quick and need only measuring cups and spoons.
When Weight Wins
For baking, where ratios of flour, water, and leavening drive the result, weighing ingredients in grams is far more reliable. Professional recipes and most cookbooks outside the US use grams.