A cup of flour and a cup of sugar don’t weigh the same, so a single “grams to cups” number is wrong for most ingredients. Pick the ingredient first — every weight here comes from the USDA FoodData Central database.
A US cup is a volume (about 237 ml). How much an ingredient weighs in that volume depends on its density and on how it’s packed: fluffy cocoa powder is 86 g per cup, packed brown sugar is 220 g, honey is 339 g. Flour is the trickiest — scooped straight from the bag it can weigh 20% more than spooned and leveled. That’s why bakers prefer grams. Recipes from Australia, New Zealand and Canada use a 250 ml metric cup (the UK has no official cup; British recipes that give cups usually mean 250 ml), which holds about 6% more.