We know that Joshua divided up the Land of Israel before it was actually completely conquered. So where did the Jews live while their apportioned heritage was held by the Canaanite nations?
In Yehoshua (perek 12), there are listed all the kings that Yehoshua and benei yisrael conquered after entering C’naan. It ends by saying:
מֶ֥לֶךְ תִּרְצָ֖ה אֶחָ֑ד כָּל־מְלָכִ֖ים שְׁלֹשִׁ֥ים וְאֶחָֽד׃ The king of Tirzah, one; all the kings, thirty one
And although there was still land to be captured: (13:2)
זֹ֥את הָאָ֖רֶץ הַנִּשְׁאָ֑רֶת כָּל־גְּלִיל֥וֹת הַפְּלִשְׁתִּ֖ים וְכָל־הַגְּשׁוּרִֽי׃ This is the territory that remains: all the districts of the Philistines and all [those of] the Geshurites,
This was after a lot of the land was captured, and before the land was split, as we can see in this passuk, where HaShem commands Yehoshua to split the land (13:7):
וְעַתָּ֗ה חַלֵּ֞ק אֶת־הָאָ֧רֶץ הַזֹּ֛את בְּנַחֲלָ֖ה לְתִשְׁעַ֣ת הַשְּׁבָטִ֑ים וַחֲצִ֖י הַשֵּׁ֥בֶט הַֽמְנַשֶּֽׁה׃ Therefore, divide this territory into hereditary portions for the nine tribes and the half-tribe of Manasseh.”
So before the land was divided, benei Yisrael probably lived in conquered territory (like the wives and children of the two-and-a-half tribes who stayed in ever hayarden while their husbands went to fight in C’naan).
After the land was divided, there were probably enough cities in each portion for them to settle in. (Remember, in addition to the cities that they captured, all of the giv’oni cities were empty, [9:3-27]).