He said, "That in which my Lord has established me is better [than what you offer], but assist me with strength [i.e., manpower]; I will make between you and them a dam.
His Journey to the Land of Ya'juj and Ma'juj, and building the Barrier
Allah says of Dhul-Qarnayn:
ثُمَّ أَتْبَعَ سَبَباً
(Then he followed (another) way) meaning, he traveled from the east of the earth until he reached a place between the two mountains which were next to one another with a valley in between, from which Ya'juj and Ma'juj (God and Magog) will emerge into the land of the Turks and spread mischief there, destroying crops and people. Ya'juj and Ma'juj are among the progeny of Adam, peace be upon him, as was recorded in the Two Sahihs;
The Identity of Ya'juj Ma'juj and the Location of the Wall of Dhul-Qarnain
A lot of absurd and strange things disseminated through Isra'ili narratives and historical stories have found currency to the extent that some commentators have also reported them in terms of their historical status, though they themselves do not find them trustworthy. The truth of the matter is that the Qur'an has mentioned it briefly and the Holy Prophet ﷺ has informed his community also about the details as and where necessary. What has to be believed in as part of one's faith is limited to what has been covered in the Qur’ an, and Hadith. Beyond that, whatever historical and geographical information has been provided by commentators, Hadith experts and historians could be correct, or might as well prove incorrect. As for the variant sayings of historians from among those mentioned above, they are based on traces, analogies and conjectures. Whether they are true or false, it simply does not affect what the Qur'an says.
Probably Dhu’l-Qarnayn’s third campaign was in the north east, in the direction of Iran. He reached a place where savages were living. Because they could not have any interaction with any other community, they were hardly able to understand any other language but their own. The ‘two mountains’ probably lay between the Caspian Sea and the Black Sea. Here savage tribes used to invade from other places and would then flee through mountain passes after indulging in plunder. Dhu’l-Qarnayn constructed an iron wall between the two mountains.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.