There was obvious over-hiring in the couple years after COVID while interest rates were low. A lot of companies corrected and laid off staff when that stopped.
This was before LLMs writing code was a daily discussion topic. Blaming every layoff on AI is mostly people connecting trending headlines together.