In many cases the remaining primitive societies exist because the more technologically advanced states have decided to let them be (for the most part). The culture of the advanced societies has changed.
Amazonian tribes are protected by laws that (mostly, sort of) keep modern society from encroaching on them. Several primitive tribes on islands in India are protected the same way. Three hundred years ago, the dominant cultural movement in those protective states would have been “We need to go civilize those backwards natives. Bring them guns and religion and processed foods”. Now they are mostly left to do their thing.
And it’s not obvious to them that the technologically advanced way is better. Sure, there are certain aspects of modern civilization they’d like to have, but not the whole kit and caboodle.
I read an enjoyable book called Don’t Sleep, There are Snakes about a missionary/linguist who spent many years living with an Amazonian tribe that was pretty remote and not connected to modern society. He was for the most part unable to convince them that the benefits of modern society were worth having. He didn’t manage to convert anyone, his efforts at helping them set up more efficient industry (even though it was just learning how to build the dug-out canoes that neighboring tribes made) failed, and he observed that they seemed to be quite happy and content. Sure, their lives were more violent, and people died earlier, but that didn’t bother them the way it seems to bother us.
In one of the more memorable sections, he described how they reacted when he said how important his faith was to him when his mother had committed suicide. It took him a while to explain the concept of suicide, and when they finally got it, they laughed. They thought he was joking! They couldn’t comprehend the modern concept of social disconnection and alienation that leads to depression and suicide.