Answer
Scotland served as the realm where Margaret acted as regent. During the absence of her husband, King James IV, who was engaged in military campaigns or diplomatic missions abroad, Margaret assumed the responsibilities of ruling the kingdom. She demonstrated capable leadership, making important decisions and maintaining stability in the country during her husband's absences.