How exactly does trauma affect thinking and cognition?

It depends. This looks like a research question! it depends on the type of trauma you're asking about. Physical trauma, brain injury, exposure to traumatic events, etc. Will have different effects on people. And, a person's coping resources and individual interpretation of the event will significantly influence the outcome. There are a lot of factors to consider.
Depends. Depends on what is injured. Any blow to the head can cause cognitive issues. Significant cognitive issues even when there is no radiological sign. Cognitive issues are caused by brain damage and can range from being temporary or permanent.