The scale of Twitter is large but not enormous. Basically a few trillions of messages overall. Most of them pretty small. All of them immutable (well so far). And lots of images/videos with some CDN in front of that. It's a lot of bytes but not a whole lot of complexity. And a couple hundred million users and user profiles. I can think of a quite a few ways of dealing with all that.
What's hard is things like algorithms and good search. But that's a space where you can achieve a lot with a small and focused team with access to lots of hardware. And obviously this is also something where Twitter has maybe been a bit underwhelming and struggling. User growth and engagement stagnated years ago for them. This was not a healthy social network. It's not like they were nailing this. Throwing more people at the problem wasn't working.