Layoffs and stock buybacks are usually perceived by investors as savvy business decisions by pragmatic leaders when in reality both are an admission by the board and management that they have no idea what they're doing.
Layoffs are an admission the company doesn't know how to use human resources.
Stock buybacks are an admission the company doesn't know how to use capital.
https://news.stanford.edu/2022/12/05/explains-recent-tech-layoffs-worried/