In the anime, it is shown that the Senju and Uchiha clans originated from the Sage of Six Paths who is the God of Shinobi. Where did the other clans like Sarutobi, Nara, Inuzuka, clans from other countries originate from?
Recall that the Sage of the Six Paths discovered the existence of chakra and used it to create jutsu. The direct descendants of him became Senju and Uchiha, where their powers were split between body and eye.
Other ninja clans were not descendents, however they were able to learn how to use chakra as well in different forms of jutsus. Of course there are some clans, like the Hyuuga where the series notions the possibility of them deriving from the Uchiha.
Clans like Sarutobi, Nara, and Inuzuka clans are not related to the Sage of Six Paths though. On the other hand, Uzumaki is blood related to Senju.
Just to clarify any misconceptions, there were already people living on earth before Otsutsuki Kaguya made her move to steal the chakra of the Divine Tree. Its actually not like the Otsutsuki clan populated earth in its entirety. Just like someone said in the comments, there were villages and empires belonging to different settlements at that time. And so to answer your question, all those other clans originated on earth just like normal families do. However, everyone was greatly influenced by the Otsutsuki clan.
Longer version: The people who lived in The land of the Ancestors, welcomed Kaguya because they saw her as a Goddess and she bore 2 children with Tenji, the Emperor of the land (Hagoromo and Hamura).
The elder brother, Hagoromo Otsutsuki became known as the Sage of Six Paths, because he founded and taught everyone about Ninjutsu which was originally called Ninshuu. All other clans must have learned thier various Jutsus from any number of thier Ancestors who was a follower of Hagoromo (or a follower of a follower of Hagoromo, kinda like that).
Apart from the Hyuuga, Uchiha, Senjuu and Uzumaki clan (all of whom inherited specific chakra and traits of the Otsutsuki Clan), all other clans learned Jutsu's indirectly from the Sage of six paths teachings.