Hi Furkan. "That" is a connector. It is used to connect two parts of a sentence. It doesn't exist in Turkish, so there's nothing I can compare it with.
Do not mention + I do it. To connect these two, in English, we use a connector. And that connector is "that". Do not mention that I do it. You don't have to write it most of the time. It's optional. But because you have another part before "what happened", then you need it. I hope that helped.