Answer
The answer is the Cadet branch. A cadet branch is a secondary line of a royal or noble family that descends from a younger son or daughter of the main line. In the case of Margrethe II, her lineage branch is the House of Glücksburg, which descends from a younger son of the House of Oldenburg, the former ruling dynasty of Denmark.