In the initial stage of Israel's government, there was just Moses. But the burden of governing so many people was too great for him:
The LORD your God hath multiplied you, and, behold, ye are this day as the stars of heaven for multitude. (The LORD God of your fathers make you a thousand times so many more as ye are, and bless you, as he hath promised you!) How can I myself alone bear your cumbrance, and your burden, and your strife? Take you wise men, and understanding, and known among your tribes, and I will make them rulers over you. (Deuteronomy 1:10-13)
The Dake Annotated Reference Bible offers the following summary of the development of government in Israel, on page 197 of the Old Testament: