CBG is the precursor acid to all of the cannabinoids so it is present first. It is my understanding that (without scientific URL links) the highest concentration of CBG will be found early on in the plant, way before Thc/cbd and long before THC degrades to CBN. It is also my understanding that the roots of the plant contains high levels of CBG, so it's a matter of when and where for the home grower.
In a commercial setting, like what you have most likely bought the process is done in a lab through isolation with heat/cold, extraction, and dissolution. CBG has the lowest vaporizing point, if I remember right which I apparently do not in my old age.
I would reseach the when and where if you are looking from a at home point as the extraction process is more precise it requires expensive equipment and more than basic chemistry knowledge.