Allah gave Dhul-Qarnayn power and the means to travel. His story shows a ruler using those gifts to judge fairly and protect people.
The story
Power with responsibility
Allah established Dhul-Qarnayn in the land and gave him means to pursue his journeys. Travelling west, he reached a people and was given a choice concerning their treatment. He distinguished between wrongdoing and faithful, righteous conduct. He explained that wrongdoers would face punishment and return to Allah, while believers who acted rightly would receive good treatment. His authority was connected with accountability, not simply conquest.
Dhul-Qarnayn continued east and then followed another route until he reached a place between two barriers. There he encountered people who could scarcely understand speech. They complained about the corruption of Yaʾjūj and Maʾjūj and offered payment for a protective barrier. Dhul-Qarnayn answered that what Allah had given him was better, and asked them instead to help with the strength needed for the work.
Dhul-Qarnayn directed the people to bring pieces of iron. When the gap had been filled, he had them heat the iron and then brought molten copper to pour over it. Yaʾjūj and Maʾjūj could neither climb the barrier nor break through it. Dhul-Qarnayn credited Allah's mercy for the achievement and acknowledged that the barrier would fall when Allah's appointed promise came to pass.
Dhul-Qarnayn used the means Allah gave him to answer the needs of people facing harm. He organized practical work rather than merely accepting their payment. His example connects authority with service and shows strength being used to provide protection for others.
After completing a remarkable barrier, Dhul-Qarnayn did not present it as proof that he was independent of Allah. He attributed it to divine mercy and recognized its appointed limit. Gratitude means remembering both the source of an achievement and the limits of human power.
Use whatever ability Allah gives you to act fairly and help others. Real strength does not remove dependence on Allah, and even an impressive achievement remains subject to His decree.
Summaries of Ibn Kathīr's commentary on the linked āyāt, with authentic ḥadīth noted in the text where used. Verse links open Quran.com text and your chosen translation.