Meta is preparing for its largest-ever layoffs, potentially affecting 20% of its workforce as it reallocates resources to AI.