Gigantamax is essentially a subset of Dynamax. Not all Dynamaxed Pokemon are Gigantamaxed, but all Gigantamax Pokemon are Dynamaxed. Some Pokemon have Gigantamax forms, like Centiskorch, Machamp, and Garbodor. These forms can be obtained from finding the special form in a Max Raid battle, or by applying Max Soup to the Pokemon in question. Occasional events are held to make Gigantamax Pokemon more common in Raid Dens.
Both Dynamax and Gigantamax last a maximum of three turns when activated by a trainer. It should be noted that Pokemon with Gigantamax forms are not necessarily guaranteed to be able to Gigantamax. These Pokemon may also achieve regular Dynamaxing.
In conclusion, think of Dynamax and Gigantamax as the relation between rectangles and squares -- all squares are rectangles, but not all rectangles are squares.
Hope I helped!