Grams to cup measurements
Grams of what?

Grams is a measure of weight (actually mass, but we'll assume you are cooking on earth).

Cup is a measure of volume.

Different substances have different density, and powdered items like flour can be more or less packed or settled.  

To confuse things a bit, in the USA we have ounces (weight) and fluid ounces (volume). When we talk about volume in fluid ounces, a shorthand is to just say ounces.

One cup = 8 (fluid) ounces.

But that 8 fluid ounces can be:

approximately 4.5 ounces of flour, really 120-130 grams, depends on the grind and the sift

approximately 8 ounces of water (that is where fluid ounces came from)

a bit more than 8 ounces butter 

etc.