Those two books do not appear in the Bible canon. Were these inspired writings that have been lost?
There is no reason to conclude that those two books were produced under inspiration and later lost. Inspired Bible writers referred to quite a few other writings. Some of those may indeed be parts of the Bible that simply were described in terms unfamiliar to modern readers.
For example, 1 Chronicles 29:29 mentions “the words of Samuel the seer,” “the words of Nathan the prophet,” and “the words of Gad the visionary.” Those three could constitute a collective reference to books we know as 1 and 2 Samuel, or perhaps the book of Judges.
On the other hand, certain references may be to books that have names similar to books of the Bible but that are not actually part of the Bible. We might illustrate this with four ancient books: “the book of the affairs of the times of the kings of Judah,” “the Book of the Kings of Judah and of Israel,” “the Book of the Kings of Israel,” and “the Book of the Kings of Israel and of Judah.” While those names may sound similar to the names of the Bible books we know as 1 Kings and 2 Kings, the four books were not inspired, nor do those books find a place in the Bible canon. (1 Ki. 14:29; 2 Chron. 16:11; 20:34; 27:7)
They were likely just historical writings available back in the period when the prophet Jeremiah and Ezra wrote the accounts that we have in the Bible.
Yes, some Bible writers did refer to or consult existing but uninspired histories or documents. Esther 10:2 refers to “the Book of the affairs of the times of the kings of Media and Persia.” Similarly, to prepare his Gospel account, Luke “traced all things from the start with accuracy.”
He probably meant that he consulted written sources available to him as he compiled the list of Jesus’ genealogy that we can read in his Gospel. (Luke 1:3; 3:23-38) While the records Luke consulted were not inspired, his resulting Gospel certainly was.
And that Gospel remains valuable for us.
As for the two books mentioned in the question—“the book of Jashar” and “the book of the Wars of Jehovah”—they seem to have been existing documents that were not inspired. Because of that, Jehovah did not see to their preservation. The Biblical references to those two books lead scholars to conclude that the two were collections of poetry or songs dealing with conflicts between Israel and its foes. (2 Sam. 1:17-27)
One Bible encyclopedia suggests that the contents of those books may have been “the familiar oral repertoire of professional singers in ancient Israel who preserved Israel’s epic and lyric traditions.” Even some men whom God at times used as prophets or visionaries made records that Jehovah did not inspire or choose to have incorporated in the Scriptures, which are “beneficial for teaching, for reproving, for setting things straight” in our day.—2 Tim. 3:16; 2 Chron. 9:29; 12:15; 13:22.
The fact that certain books were mentioned in the Bible and that they were usable sources should not lead us to conclude that they were inspired. However, Jehovah God has preserved all the writings containing “the word of our God,” and these “will last to time indefinite.” (Isa. 40:8)
Yes, what Jehovah chose to include in the 66 Bible books that we have is just what we need to “be fully competent, completely equipped for every good work.”—2 Tim. 3:16, 17.