According to judeo christian mythology 2 people were the ancestors of the whole human race.
Tolkien wrote a story that may or may not be true in the canon of middle Earth that all Elves descend from 144 elves who awoke at Cuivienan. I never read how many were in the first generation of humans.
Durin was the first dwarf to awake. Suppose that he woke 100 years before the other dwarves. Suppose that the average dwarf generation is 100 years. Then Durin's future wife might be born when Durin was only 200 and they might start having children when Durin was only 300. Most of Durin's sons and grandsons and great grandsons would have married female dwarves from other races and kingdoms, and vice versa.
Suppose that Durin had 3 children at age 300, 9 grandchildren at age 400, 27 great grandchildren at age 500, 81 in the next generation at age 600, 243 in the 5th generation at age 700, 729 in the 6th generation at age 800, 2187 in the 7th generation at age 900, 6,561 in the 8th generation at age 1,000, 19,683 in the 9th generation at age 1,100, and 59,049 in the 10th generation at age 1,200.
But if there were four children in each generation Durin would have 4 children about age 300, 16 grandchildren at age 400, 64 great grandchildren at age 500, 256 in the 4th generation at age 600, 1,024 in the 5th generation at age 700, 4,096 in the 6th generation at age 800, 16,384 in the 7th generation at age 900, 65,536 in the 8th generation at age 1,000, 262,144 in the 9th generation at age 1,100, and 1,048,576 in the 10th generation at age 1,200.
At the time of LOTR dwarves usually lived about 250 years but they probably lived longer during the Elder Days. Maybe the average dwarf lived to be about 500 during the First Age. Durin died before the end of the First Age, but he lived so long that he became known as Durin the Deathless. So Durin could have lived hundreds or even thousands of years longer than than the average dwarf at the time of LOTR, and could have had millions of descendants in his dwarf kingdom at Moria.