There are remains of ziggurats in this region so there is something physical to look at. Are any of these the “actual” tower? Probably not. Some point to Etemenanki as a possible source for the story. See wikipedia. I had to smile at the “Although Etemenanki has sometimes erroneously been identified with the Tower of Babel from Genesis 11 in the Bible, the archaeological record is incompatible with the biblical account of the Tower of Babel, …” since the author didn’t intend to record history and it is not surprising that the account doesn’t match history.
Given languages existed before this story it is obvious that God didn’t create languages at this point.
Simplest is it is the origin story for languages. Although I don’t know why that was important enough to include. Although you could say Genesis 1-11 are all origin stories to provide the backstory to the origin of the Israelites.