This is how the Quran has described mountains. God has said in the Quran:
“Have We not made the earth as a bed, and the mountains as pegs?” (Quran 78:6-7)
Modern earth sciences have proven that mountains have deep roots under the surface of the ground (see figure 3) and that these roots can reach several times their elevations above the surface of the ground. So the most suitable word to describe mountains on the basis of this information is the word ‘peg,’ since most of a properly set peg is hidden under the surface of the ground. The history of science tells us that the theory of mountains having deep roots was introduced only in the latter half of the nineteenth century.
Mountains also play an important role in stabilizing the crust of the earth. They hinder the shaking of the earth. God has said in the Quran:
“And He has set firm mountains in the earth so that it would not shake with you…” (Quran 16:15)
Likewise, the modern theory of plate tectonics holds that mountains work as stabilizers for the earth. This knowledge about the role of mountains as stabilizers for the earth has just begun to be understood in the framework of plate tectonics since the late 1960’s.
Could anyone during the time of the Prophet Muhammad have known of the true shape of mountains? Could anyone imagine that the solid massive mountain which he sees before him actually extends deep into the earth and has a root, as scientists assert? A large number of books of geology, when discussing mountains, only describe that part which is above the surface of the earth. This is because these books were not written by specialists in geology. However, modern geology has confirmed the truth of the Quranic verses.
Source : https://www.islamreligion.com/articles/215/quran-on-mountains/