Rabbinic Judaism recognizes the 24 books of the Masoretic Text, commonly called the Tanakh or Hebrew Bible, as authoritative. Modern scholarship suggests that the most recently written are the books of Jonah, Lamentations, and Daniel, all of which may have been composed as late as the second century BCE.
The Book of Deuteronomy includes a prohibition against adding or subtracting, which might apply to the book itself (i.e. a "closed book", a prohibition against future scribal editing) or to the instruction received by Moses on Mt. Sinai.
The book of 2 Maccabees, itself not a part of the Jewish canon, describes Nehemiah (around 400 BCE) as having "founded a library and collected books about the kings and prophets, and the writings of David, and letters of kings about votive offerings" (2:13–15). The Book of Nehemiah suggests that the priest-scribe Ezra brought the Torah back from Babylon to Jerusalem and the Second Temple (8–9) around the same time period. Both 1 and 2 Maccabees suggest that Judas Maccabeus (around 167 BCE) also collected sacred books (3:42–50, 2:13–15, 15:6–9).