Here is an article on it: https://www.polygon.com/23894267/epic-games-fortnite-unreal-engine-layoffs-2023
Looks like they just were spending too much and needed to clean up. On the positive side, they're offering all affected employees 6 months of severance + healthcare. That is really generous of them.