First: Don't define yourself by what you know or what you can do. That way, if what you do gets rendered obsolete,
you aren't threatened. Your income may be, but who you are isn't.
Second: There has always been this threat; you're just more aware of it. Many farmers became obsolete due to mechanized agriculture. Many factory workers became obsolete due to automation and/or offshoring. Elevator operators. Telephone operators. Typists. And on and on; there's a long history of jobs disappearing. Try to be able to do more than one thing; it gives you more options.
One strategy might be to try to get better at relating to people. In the future, an AI may be able to give you an answer, but it can't give you a believable smile. Humans still want human contact; there's some value in being able to give it to them.
The future belongs to those who believe there will be one. Or, put the other way around: Those who give up in despair because they think that there will be no future will find that there isn't much of one, at least for them. Don't quit in despair. Keep trying to learn new things and new skills.