I was surprised to find out that there are still many indigenous groups with populations in the millions. My California public education made it seem like they were all pretty much wiped out save for those who survived to the various reservation systems.
My favorite group is the Mapuche who managed to hold out against the Spaniards until they were conquered by Chile and Argentina in the late 19th century. They managed to thwart the conquistadors for centuries! It wasn’t until the modern era where military logistics got good enough to unseat them and overcome the advantages they had.
This is also a difference in outcomes between traditional colonialism (where indigenous people were viewed as a source of labor) and settler colonialism (where indigenous people are viewed simply as "in the way"). That's not to say that traditional colonialism is in any way acceptable, however.
The Mapuche even expanded their territorial control, in large part to their acquisition and mastery of Spanish horses.
Relatively (adjusted by area and duration) not that many people from Spain moved to the Americas between 1500 and ~1800, especially compared to the British colonies in North America.
So they couldn't murder/expel (unlike the British/American colonists) most of the native population (especially considering that North America was much less densely inhabited to begin with) if they wanted someone to work in the mines and plantation (again relatively not that many slaves were imported to the mainland colonies as well).
France was similar (except they struggled even more with getting enough people to move to the colonies).
The Commanche also held out until after the Civil War.
Even in the US, the Indian Wars weren't finished until the 1890s. In fact, most of the big wars against the Native Americans took place after the American Civil War. One of the big faults I have with US history in the education system is that it tends to front-load the depiction of Native Americans in the Precolonial portion of history, with an echo in the Trail of Tears and forced migration in the 1830s, and largely edits them out of the history of the settling of the west, despite this process requiring a very violent dispossession of the existing inhabitants.