The Book of the Law started as a scroll or set of scrolls written by Moses, then passed on to the Israelites when Joshua led them into Canaan. Because the scrolls were also used for recording
covenants between God & the Israelites, it was kept in the Ark of the Covenant. As such, it was also known as the Book of the Covenant.
The scrolls were misplaced, then they resurfaced during the reign of Josiah when they began referring to it as the Book of Moses. 2 Kings & 2 Chronicles have parallel passages regarding the rediscovery of the Book of Moses.