There was an observable tech bubble during COVID, that has now popped. It's not unusual for markets to bubble and pop like this; the tech bubble during COVID may have been because businesses were forced to rely on technology more during the pandemic, or it may have just been standard random market fluctuations. In any case, the market is now correcting, which leads to stocks falling and layoffs following.
Twitter is hit the hardest because the platform was never profitable. Elon Musk was forced into buying it and seems unconcerned about tanking it. There's speculation that Elon was only pretending to offer to buy Twitter, to manipulate the stock for his own profit. At first he tried to escape by pointing out how many Twitter users are bots and so the platform is even less financially viable than is publically stated, but this tactic did not work. So he immediately pursued layoffs, and may even tank the whole platform. This would be rational if the platform is only ever going to lose him money in the long run.
Meta is being hit the second hardest by the market correction. Mark Zuckerberg bet big on the "Horizons" metaverse, which isn't panning out. "Horizons" is like Second-Life in VR, which sounds unappealing to most, Zuckerberg was hoping it would catch on eventually. The strategic value of a big VR second-life is that it gives Meta a device category they can lead in. Currently all of Meta's products (Facebook, What'sApp, Instagram) exist entirely on their competitor's products. So if their competitors at Apple, Google, and Microsoft decided tomorrow to ban Meta apps (perhaps due to election manipulation, for example) Meta would be dead the next day. This limits Meta strategically, so they were willing to burn billions and billions of dollars on making "The Metaverse" and "VR goggles" into the next big thing.
All the other tech companies (Amazon, Microsoft, Apple, Google, etc.) will probably take the opportunity to do layoffs as well, though not for any big dramatic reason other than "we hired an unnecessary number of people during the 2020 tech bubble." Some of the tech companies like Microsoft have already done little layoffs. It remains to be seen whether they will do more in the future, or whether the market will go into recovery.