Complete loyalty to the first presidency refers to following and obeying the leaders of the church.

Mormon Church members in good standing have to do whatever is asked of them, because ultimately, the “inspiration” comes from higher up.

The question you have below is from the temple recommend interview. By answering yes, you are essentially saying that you will do whatever is asked of you at whatever level, the thought process being, since “God” chooses the prophet, and the prophet and apostle chooses new apostles, the apostles choose the quorum of the seventy who chooses the area presidencies who chooses the stake presidents who choose the bishops; if any of these people at any level ask you to do anything, you have to obey because it ultimately comes from God.

The promise to follow God and his leaders (via the Mormon phrase “keep the commandments”) is a vow that all Mormons make in the temple. The officiator at the beginning makes the following statements (acting as Elohim or God);

ELOHIM: Each of you bring your right arm to the square. You and each of you solemnly covenant and promise before God, angels, and these
witnesses at this altar that you will obey the law of God, and keep his commandants. Each of you bow your head and say “yes”.
MEN: Yes.

The same is repeated for women, except they have to obey their husbands who obey God.

In one of the Sunday School Manuals that the Church printed and uses has the following paragraphs from Heber Grant, who was the Mormon prophet from 1918 to 1945. I can still remember this Sunday School lesson back in 2004 and how much it bothered me, even though at the time I was a very devout Mormon. All Mormons leaders have essentially said the same things, and I could find more current ones if you wanted. By publishing these in official Sunday School Manuals, the church has essentially codified the following. They will often claim that certain sayings or teachings are not “official,” but they put these ones in print themselves (mostly cherry-picked for their own pursuits) These are all Mormon beliefs:

Years later, President Heber J. Grant offered this simple admonition to guide the lives of the Latter-day Saints: “I know of nothing that I feel is of so great value in life as to be obedient to the counsel and advice of the Lord, and of His servants in this our day.”

“I was called into the Council of the Twelve Apostles by a revelation of the Lord to President John Taylor, and from the time that I entered the Council of the Twelve, two years after John Taylor was made President of the Church, until the day of his death, I met with him, week after week. . . . I know that he was a servant of the living God; I know that the inspiration of the Lord came to him; and I know that upon all occasions, whenever he said: “This is what the Lord desires,” and his associates in the council of the apostles sustained his position, that upon every occasion he was vindicated and the inspiration of the Lord to him showed that his wisdom by the power of God, had been superior to the wisdom of other men.”

“Several times I have gone to meetings . . . , knowing that a certain matter was to be discussed and my mind was as perfectly set upon a certain position on that question as it is possible for a man to have his mind set. . . . While I have gone to meetings . . . determined in favor of a certain line of policy, I have willingly and freely voted for the exact opposite of that policy, because of the inspiration of the Lord that came to John Taylor. Upon every such occasion the servant of the Lord, President Taylor, was vindicated, and his superior judgment, by the inspiration of the Lord, asserted itself in favor of those things that were for the best good of the people.”

“It has never ceased to be a wonder to me that I do represent the Lord here upon the earth. My association from childhood with the remarkable and wonderful men that have preceded me has made it almost overwhelming to think of being in the same class with them.”

“Faith is a gift of God, and when people have faith to live the gospel, and to listen to the counsel of those who preside in the wards and stakes and of the General Authorities of the Church, it has been my experience that they have been abundantly blessed of the Lord, and that many of them have come out of great financial and other difficulties in a most miraculous and wonderful way.”

“Let us be ready and willing to follow our file leaders, and to sustain them. . . . You will always be blessed and benefited in following the advice and counsel of those whom God has chosen to preside over the Church. By honoring the man God has chosen, God will honor and bless you; and as you individually do your duty, you will grow and increase in the light and inspiration of the Spirit of God. As we grow and increase individually, so will the Church grow and increase. . . . This is the work of God. Joseph Smith was a prophet of God; we must remember that. We must “seek first the kingdom of God and His righteousness,” and then shall all other things be added [see Matthew 6:33]. Life eternal is what we are working for. Do not allow the wisdom, the riches or the education of the world, or anything else, to blind our eyes to the fact that this is God’s work, and that the mouthpiece of God is on the earth; when he speaks, let us be ready and willing, with our time, our talents and all that has been given us, to labor to fulfill what God desires. I tell you, God will vindicate His mouthpiece.”

“We sing and have done so constantly, “We thank Thee, O God, for a Prophet to guide us in these latter days. [Hymns, no. 19.] There are a great many who . . . put a postscript to that and say: “Provided he guides us to suit our own fancies and our own whims.”

“The prophets of God, from Joseph Smith to the present day, have guided us and they have guided us aright, when we have listened to that guidance. The mistakes which have been made have been because of our failure to listen to the prophet whose right it is to guide the people of God. . . .”

The Teachings of Brigham Young

“The Latter-day Saints who hearken to the words of the Lord, given to them touching their political, social, and financial concerns, I say, and say it boldly, that they will have wisdom which is altogether superior to the wisdom of the children of darkness, or the children of this world. I know this by the revelations of the Lord Jesus Christ, and by the results of my own actions. They who have hearkened to the counsels given to them in temporal matters, have invariably bettered their condition temporally and spiritually.”