If Moses the prophet was the writer of the first five Books of he Bible, how could they include the account of his death? (Deut. 34:5-8).
This account was of course written by Joshua the son of Nun, and did not come at the beginning of the Book of Joshua but came at the end of the five Books to complete the story of Moses.
This coincides with the beginning of the Book of Joshua
“After the death of Moses the servant of the Lord, it came to pass..”