You need to learn to observe what’s going on in your mind almost like a third-person observer.
This is difficult and requires a lot of practice.
Oh it requires patience. It also needs "vocabulary" to refer to things with, and a framework to help achieving it if you will. A while back, I randomly found some video from Jiddu Krishnamurthi. I was in the right mood so watched a few and at the end of it tried to actually observe my thoughts. I was only able to do it because the mind was sufficiently wound down and JK really helped. It was a bunch of videos and I have not taken note of it. But I had the following in a playlist.
https://www.youtube.com/watch?v=LZlkYPlS5s0
Hope that's the important one and it helps someone.