Cognitive behavioural therapy rests on a simple observation: it is rarely the event itself that determines how we feel, but what we made it mean.
That is not a claim that thinking positively fixes everything. It is a claim that the interpretation is a step, and steps can be examined.
The loop
Thoughts, feelings and behaviour are not a chain — they pull on each other in a loop. A thought sharpens a feeling, the feeling drives an action, and the action supplies evidence for the next thought.
The useful part is that you can enter the loop at any point. Changing the behaviour changes the thought just as reliably as the other way round, and is often easier.
Event, belief, consequence
Between what happens and how you feel sits a step so fast it usually goes unnoticed: what you told yourself about it. Two people can live the same afternoon and land somewhere completely different because of it.
Thinking traps
A tired or frightened mind takes shortcuts. Everyone uses them. All-or-nothing thinking deletes the middle ground; mind reading assumes what others think; fortune telling states the future as fact; "should" statements hand you guilt for breaking rules you never agreed to.
Naming the trap is often enough. You do not have to argue yourself out of a thought to stop treating it as a fact.
A reframe you do not believe will not help. Aim for truer, not cheerier.