I have a number of librarian acquaintances who seem to cope with the gradual disappearance/destruction of their careers by telling themselves "one day, they'll get sick of current state, and they'll be back". I hope it's true.
all that aside, i taught myself to program, because i could read the writing on the wall in that career. that was a wash too. now i have to compete with AI?! one day? i'm done. i'd rather commit suicide than have to keep chasing a nowhere goal.