“ And it shall be, when you have seized the city, you will set the city on fire. You will do according to the word of YHWH. See I have commanded you.”
Once the city was taken it was to be set on fire. This would both act as a signal and would begin the fulfilment of YHWH's instruction to ‘devote' the city and its citizens, but not the cattle (Joshua 8:2).