The government cannot punish individuals for speaking opioions.
Private business can ban anyone as long as the person is not in a protected class in a few defined activities. Social medias are protected by Act 230 which Trump wanted to remove. Without the protection of 230, social medias can be sued for user posted content. So Twitter gave Trump a dose of his own medicine of what he wanted. Twitter doesn't want to be held responsible in the future for hosting insurrection propaganda.