The people of Canaan represented a number of “tribes” such as the Girgashites, Perizites, Gibeonites and more.
The book of Joshua shows us that he was commanded by God to completely destroy these nations from the land, and they did so in two southern cities, Jericho (Joshua 6) and Ai, (Joshua 8) and in at least one northern city Hazor. (Joshua 11) All three of these cities were destroyed by fire.
The Gibeonites mounted a deception – (Joshua 9) pretending to be from a foreign land, and made a treaty by which they preserved themselves, but in theory the other tribes were not safe. However it is pretty clear from the biblical accounts that Joshua and the Israelites failed to complete the task assigned them.
According to the Bible, the culture of the land was so hideous, violent, and bloodthirsty that it had gone too far to be redeemed and had to be removed. One example is the child sacrifice that was a widespread practice through the land of Canaan. Burning children alive before the idol molech is one example. The situation was significantly evil, or at least that is how I have come to undersand it.
The book of Psalms describes the outcome using Ephraim as a metaphor for all Israel… “the archers of Ephraim turned back on the day of battle.” (Psalm 78:9). My guess is that didn’t have a stomach for ongoing warfare, and having come out of a history of slavery were also not hugely experienced in warfare. They were just haappy to have somewhere to settle down.
So in most cases the Canaanites ended up co-existing alongside the Israaelites – in some cases the Israelites destroyed them. The struggle that many people have today is why would God command something that appears to be a genocide. There are good answers to this question, but most significantly, we lack the context of how horrible the situation was on the ground, and how righteous God is.
The story of Joshua cannot easily be removed from the Bible, and it does need to be understood as a part of the whole. It illustrates how Godo hates evil practices – similar to the Sodom anad Gomorrah story, and the Noah’s ark story, and is a reminder that there is an impending judgement for all people.