If iron is exposed to oxygen and water it will eventually convert to rust and disintegrate.
Rust is an iron oxide, a usually red oxide formed by the redox reaction of iron and oxygen in the presence of water or air moisture. Several forms of rust are distinguishable both visually and by spectroscopy, and form under different circumstances. Rust consists of hydrated iron(III) oxides Fe2O3.nH2O and iron(III) oxide-hydroxide (FeO(OH), Fe(OH)3).
Coatings and painting
Rust formation can be controlled with coatings, such as paint, lacquer, varnish, or wax tapes that isolate the iron from the environment.
Wikipedia, Rust, 2019
To prevent rust you have to block the oxygen or water. One of the used methods is to coat the iron. This was known recently; however this was portrayed in the Quran 1400 years before it was discovered. In the story of Thu-Al-Karnain he poured tar over the iron.
[Quran 18:96] "Bring me blocks of iron." So that, when he split it equally between the two shells, he said, "Blow." And having turned it into a fire, he said, "Bring me tar to pour over it."
He coated the iron with tar. Today we know why; tar prevents oxygen and water from reaching the iron, thus preventing rust.
How could an illiterate man who lived 1400 years ago have known how to prevent rust?