After laying out Jacob/Israel’s family in chapter 35, chapter 36 now turns to focus on laying out Esau’s lineage and the lineage of the surrounding nations. Further, after these descendants, Moses lists all the kings who reigned in the land of Edom, before the Israelites had any king (“human” king that is) (vs. 31).
While not necessarily being exhaustive, Moses seems to have intended to give an account for the many nations that exist as well. Even though God’s chosen people would often have difficulty and conflict with these nations, God is continuing to show that when He makes promises He will keep them, no matter what the earthly circumstances look like: being outnumbered by unbelievers, being attacked by peoples with different belief systems, etc. God remains faithful. And He is working to one day bring His Son to save people from each of these nations.