I found that this myth is in Zoroastrianism (Selections of Zadspram and the Greater Bundahishn). How early did this myth of mountains being used to stabilize a shaky Earth appear in Zoroastrianism? Any relevant information would be a help.
In anthropology, this is called "sacralization of the landscape" (and the elements that constitute it). It can be found in many classic texts, one of the oldest being the 山海经 (Shan Hai Jing) - Classic of Mountains and Seas 4th century BCE
As for the dating of the Zoroastrian myths you mention:
The Selections of Zadspram are generally thought to be contemporaneous with Book 7 of the Denkard, which details the "legend of Zoroaster". The latter is dated around the 7th century CE.
The Greater Bundahishn is also thought to be roughly contemporary with the Denkard.
Both works are partially based on older stories recorded in the Avesta. The surviving texts of the Avesta, as they exist today, derive from a single master copy produced by collation and recension in the Sasanian Empire (224–651 CE).
The problem with this dating is it only reflects the oldest written recordings we know of the myths, which are based on an older oral tradition. But unlike similar situations in -for example - Buddhism and Islam, we do not have a clear and substantiated idea on how long the period is between the generation of the oral tradition and the recording of the oral myths into writing.
The similarity with the Rigveda myths is not surprising: from comparative linguistic analysis of the Avesta and the Rigveda, it is clear that both collections are from the period after the proposed date of separation (c. 2nd millennium BCE) of the Proto-Indo-Iranians into their respective Indic and Iranian branches.