1 Samuel 10:8

And thou shalt go down before me to Gilgal; and, behold, I will come down unto thee, to offer burnt offerings, and to sacrifice sacrifices of peace offerings: seven days shalt thou tarry, till I come to thee, and shew thee what thou shalt do.

After anointing Saul king, Samuel directed him to go down to Gilgal ahead of him and wait seven days there until he came to offer burnt offerings and peace offerings and show him what to do, placing Saul's next actions under Samuel's guidance.
The signs foretold for Saul's journey in 1 Samuel 10:5-10 came to pass, when the Spirit of the Lord came upon him and gave him another heart and changed him into a converted man, enabling him to join the prophets in praising God and to speak with unusual fluency and wisdom.
This change in his spirit gave him influence with Israel's armies as he was set in his work.
That change came from the operation of God's Spirit, unlike a change of character produced by a harmful influence.

The seven-day wait was a test of patient obedience to reveal whether Saul would trust God and depend on Him rather than act from appearances, impatience and discouragement, and thus whether he could be trusted to rule Israel in a difficult crisis.
Saul was to use the waiting time to encourage the people and prepare them to seek God, with the burnt and peace offerings calling them to examine their hearts and repent so their offerings would be accepted and God's blessing would attend their efforts against the Philistine enemy.
Before the appointed time had fully passed, Saul became impatient and discouraged and failed to wait for Samuel, presumptuously following his own judgment by taking the priestly office upon himself and offering the burnt offering, though he had not been appointed to it.
The king was not authorized to assume the priesthood, even in an emergency.

The command belongs to Saul's early calling when the Lord gave him the Holy Spirit as guide and helper to enlighten his understanding and soften his heart, placed him where he could develop the qualities needed to rule, and gave him faithful instruction and reproof through the prophet.
While humble and willing to be taught he was prepared to receive divine wisdom, and continued seeking of that guidance would have let grace strengthen his good qualities, weaken his evil tendencies, and enable successful and honorable service.
Saul nevertheless remained perverse because his impetuous spirit had not been trained in submission when young and he was ready to rebel against divine authority, showing that early habits of honoring God's will prepare a person for later service, while long-perverted powers cannot simply be made fresh for a different course by choosing to change.