Bible-believers as with Jeremiah and others contend, further, with two Joshuas - or, perhaps, four. For the JudaeoChristian community the main two are the MT (> Vulgate and near everyone else) and the Greek (> Old Latin). The Dead Sea is less helpful than you'd think - or hope: it has a MT (with a few variants) and "4Q Joshua a". The latter might be a retelling, like the Samaritans have their own "Joshua"; albeit, here, perhaps based on an earlier Joshua edition. This topic is colossally complex, but it seems not complicate.
Ernst Knauf, generally-respected at this blog, is respected enough on better fora to be allowed there a summary (pdf).
The story (of the story) begins with a Joshua 6 and 9-10. This, per Knauf page 359-60 #1-3, is what arrived in Achaemenid Jerusalem 500-450 BC with chapter 11 as supplement. Also arriving was the Holiness redaction of Leviticus, which got notorious enough that Ezekiel will read it. The Deuteronomic History from 1 Reigns/Samuel 9+ also by-then was extant. This is where Knauf #4 kicks in, assigning the bulk of Joshua 1-21 as the Greeks will know it.
Copilot is telling me that Holiness has infused Joshua chapters 3, 5, and 7 (also 24 but everyone agrees it's late). Knauf doesn't cite what Copilot is citing, nor say much of these earlier chapters at all; but they independently come to the same conclusion that these chapters be postexilic and [Holiness-]priestly. For Knauf, Joshua 1:6-21:45 was entwined with the prior five "Mosaic" books in a Hexateuch.
Recently one Erasmus Gass has posted "The Land Distribution in Joshua 13-19". This stands to fine-tune #4. Trickling through the Temple circles was a census of cities and, also, of Tribes. The Tribes numbered... seven (18:9). These were Judah, Ephraim, Benjamin, Zebulun, Issachar, Asher, Naphtali. Gass can understand the absences of outliers Simeon, Dan, Reuben (and Machir although nobody asked him). He cannot so understand Manasseh's absence. Gass posits that our Joshua 18:1-10a, then lacking MT v. 4 (as Greek lacks it), omitted Manasseh at the time of composition. Manasseh was Samaritan territory. The "document" had excommunicated this tribe.
Now as we all know, the Samaritans came to find all manner of ways to harmonise Numbers with Deuteronomy. So did the Greeks, even unto Joshua 5:6. Gass is arguing the same process for the Jews. This antiSamaritan document now in our Joshua 18 was accreted, with reference to ... Numbers and Deuteronomy. These were never the same book, as the Samaritans knew, so the accretions were done in different stages. First was another "Priestly" (sic) redaction, to enholify the Tribes. Gass thinks Joshua 18 here got repurposed, to introduce 15-17 also 19:1-48. This chunk was to follow Numbers 34:2-12. Gass argues for the same "ideolect" of Hebrew in these pericopae. Copilot, incidentally, is telling me that Numbers 34:2-12 if not quoting Holiness Code shares Holiness ideology. I expect that serving this ideology, Numbers 14:6-9,38 inject Joshua (and Caleb) to that episode of the Scouts.
Then Joshua 15-19 got reassembled, between 14:1-5 and 19:49f as "frame". From here out, I'll let to others. I'll just note that Gass doesn't see Ezekiel as influencing the assemblage or redaction of Joshua in any way.
Overall, I'll note that the Holiness Code was a Jerusalem project and that Joshua 18:1-10a may, indeed, have been structurally antiSamaritan. The Samaritans accepted Numbers 34 on their own terms, with a lot of redaction. They simply refused the Jewish Joshua; incidentally adding some small evidence toward the lateness of this project. Maybe the men of Gerizim could have accepted Joshua 6 and 9-11 (and 1 Samuel 1-8 la-de-da), but the first scroll proffered to them had the accursed chapter 18 therein. Knauf and Gass ponder if the Jews had attempted to soften Joshua for the north. The north chose instead to write their own "Joshua".
Meanwhile the Jews shrugged; they broke their own holy Joshua into its own book, offset from Torah. Thus Joshua 1:1-5 were born. And the stuff which connects Joshua to Judges and beyond, which the Jews were also assembling.