I don’t know that G-d divided the languages by family groups but I can quote the Scripture where it says by what He did divide the nations by
“When the Most High gave to the nations their inheritance, when he divided mankind, he fixed the borders of the peoples according to the number of the sons of G-d.”
Deuteronomy 32:8 ESV
(The MT says according to the sons of Israel but the LXX and the DDS both say sons of Elohim or Elyon. That is confusing because Israel did not exist when the nations were divided and Abraham was not even yet chosen)
If in fact it was divided by the sons of Elohim then the questions arises how many are there? And how many sons of Elohim were apportioned to each nation? One each, two ...?!?
The speculation is that Genesis 10 lists 72(70) families descending from Noah so the assumption is that there are 72(or 70 depending on the spelling of names) nations and languages.
Genesis 10:5 is curious because Genesis 11 says there was only one language one the earth
“From these the coastland peoples spread in their lands, each with his own language, by their clans, in their nations.”
Genesis 10:5 ESV
Contrast
“Now the whole earth had one language and the same words.”
Genesis 11:1 ESV
So in my mind verse 5 comes after or because of the Tower of Babel and should be seen in that light.