Advancements in technology causing people to lose jobs is something that we have stressed out about ever since someone hooked a draught animal to a plow and eliminated this job:
Here is how it works when the market is relatively free:
Technology increases production by producing more with less labor. That does not make the labor unneeded. It allows labor freed up to be redirected (by natural market forces) to something else.
Thus, former plow pullers could become plow makers, and use their new tool making skills to make other items as well, to trade for then now more abundent food. The now more productive farmers could use food as payment for all kinds of services, not just plow pulling. The farmer will do that, because the alternative would be to grow far more food than he could eat and watch it rot.
People invented entirely new jobs, such as well digger, carpenter, wagonwright, cooper, jeweller, and entertainer. All in exchange for the abundent food brought by the new technology of animal powered plowing. At some point those exchanges of labor for good were made easier by the use of some kind of money.
Once in a while, there would be that guy who wasn't good for anything but plowing. What happened to him? He either died, or he was provided food by generous tribe mates. But stone-aged farmers were not dumb enough to give him money to do nothing, and the stone age women were not dumb enough to want to have his babies so that they could get free money also.
Fast forward to the modern world and what do people put out of work by technology do if no one is hiring? In my area, they hustle. They clean headlights, they fix cracked windshields, they power wash driveways and houses, they mow lawns, they collect scrap metal, they walk people's dogs, they give guitar lessons. Their labor benefits themselves and those who pay for it.
That labor was freed up by automation. No need to panic and turn Luddite just yet, folks.