Why do I keep accidentally saying stupid things?

I keep saying stupid things or misunderstanding what people say and saying the wrong thing. For instance, my friend said she was lying in bed in the middle of the day on our group text and I said hhahahahah because I thought she was just being lazy. Then I found out she had been ill and therefore bedridden and I had laughed at it? Like I didn’t know but I keep saying stupid things. How can I stop doing this?
Why do I keep accidentally saying stupid things?
Post Opinion