Fundamentally, freedom of speech is the idea that the government should not be able to prohibit, censor, or otherwise regulate what you can say.
There is a separate but related idea of a right to privacy: the idea that nobody but you and the intended recipient of a message should be able to read it. Perhaps the best known way to guarantee this with digital communications is to use end-to-end encryption, where only the sender and recipient have the keys to reveal the message.
With most centralized services like Twitter (run by private corporations), the right to privacy is not strongly guaranteed. Companies like Twitter can be (and have been) compelled by the government to provide access to this private content in response to subpoenas.
Similarly, private companies like Twitter can be (and have been) compelled by other forces (e.g. public opinion, advertisers) to regulate speech. This is because private corporations, unlike the government, have no obligatio