We know that every word that comes from God is of utmost importance. What happens when he reiterates three times in one instance? Then there must be added value to what He emphasises.
In Joshua 1 we see how God emphasises the need to be of good courage and to not be afraid. He knows that some Joshua is a young leader and that he will be filing in the shoes of an outstanding Moses.
Courage was a crucial trait which Joshua had to portray at all times so God could use him and reveal His greatness through his (Joshua’s) leadership.
See the summary in the attached video.