We are still in the early stages of AI and ML(advanced).
The pain being felt now I believe will be temporary and this new technology will inevitably bring about numerous job opportunities.
Change is constant, it is something everyone should always expect and work to be in a position where it is not very difficult to adjust when change occurs.