Scholars dispute the time of writing of Job. By some accounts it’s among the earliest, if not the earliest, text in the canon. But in any event, Job is widely accepted as influenced by earliest Mesopotamian literature, specifically the lore of Ludlul-Bel-Nemeqi
Markby writes at worldhistory.org Jan 23:
The Ludlul-Bel-Nemeqi (c. 1700 BCE) is a Sumerian and later Babylonian poem on the theme of unjust suffering, which is thought to have influenced the biblical Book of Job. Also known as The Poem of the Righteous Sufferer, the title translates as "I will praise the Lord of Wisdom" and is among the best-known works of ancient Mesopotamian literature.
The original work, dated to c. 1700, is a Sumerian composition, while the better-known Babylonian version dates to the reign of the Kassite king Nazi-Maruttash (c. 1307-1282 BCE), who ruled from Babylon.
The poem begins with the speaker lamenting his suffering as he cries out for help from his god. He compares himself to one who suffers because of ingratitude toward the gods, but maintains he has always "thought of prayers and supplications" and how "honoring the gods was the joy of my heart". At the same time, he acknowledges, what one thinks is good, the gods may consider evil, and no one can truly understand their plan.
...one's fortunes change constantly, and seemingly so randomly, there is no way to recognize any cause and effect or meaning to any of it. This, he says, is what has happened to him, and he details his suffering in lines that resonate with the same power as those of later biblical narratives including the Book of Job.
Like Job, however, the speaker refuses to curse his god and die. The Speaker, by maintaining his trust in his god's goodness and sovereignty is rewarded.
Kohler's's article CORNER-STONE explains the OP reference in Job to cornerstone in the context of ancient Mesopotamian literature (Jewish encyclopaedia 1906 pp 275):
CORNER-STONE, Kaufmann Kohler
The laying of the corner or foundation-stone (Job xxxviii. 4-6; Ps. xviii. 15, xxiv. 2) of the earth by the Creator is a conception borrowed from Babylonian Cosmogony, the earth being regarded as a huge mountain piled upon the abyss (Job xxvi. 7; "Journal Asiatique," ix. 101; Prayer of Manasses; compare Ps. xviii. 7; Micah vi. 2; Deut. xxxii. 22).
The laying of the corner-stone of a city or of a great structure was the occasion of a solemn rite in ancient times. To the pagan mind it appeared as an undertaking provoking the jealousy of the deity unless some bloody sacrifice was offered to pacify him (see Tylor, "Primitive Culture," pp. 104-108). Henceforth the foundation-stone, or the threshold beneath which the sacrificial blood was shed, remained the seat of the guardian spirit of the edifice, and hence the altar of the household
One of the many symbolical names given to the terraced tower of the temple of Bel-Marduk was "the foundation-stone of heaven and earth" (Jastrow, "Religion of Babylonia and Assyria," p. 639).
Within the Christian canon, Christ as the cornerstone is a pervasive symbol.
Isaiah 28:16 NIV
So this is what the Sovereign LORD says: “See, I lay a stone in Zion, a tested stone,
a precious cornerstone for a sure foundation……..
1 Peter 2:7 NIV
Now to you who believe, this stone is precious. But to those who do not believe,
“The stone the builders rejected
has become the cornerstone,
Acts 4:10-11 NIV
10 then know this, you and all the people of Israel: It is by the name of Jesus Christ of Nazareth, whom you crucified but whom God raised from the dead, that this man stands before you healed. 11 Jesus is “‘the stone you builders rejected, which has become the cornerstone.’
Mark 12:10 NIV
Haven’t you read this passage of Scripture:
“‘The stone the builders rejected
has become the cornerstone;
Psalm 118:22 NIV
The stone the builders rejected
has become the cornerstone;
To answer the OP question, the cornerstone of Job 38 not only has its place in ancient creation and 'problem of unjust suffering' lore and OT rites, as understood by people of the time, it figuratively anticipates Christ's role(s) in that. And points to NT Christ as that cornerstone.
If people of the time did have in mind a specific structure, and we can't know, then perhaps (weakly) that might have been the Etememanki built at the 'centre of the world' in Babylonian culture.