A good place to start is to gently discipline your mind to become a welcoming place for whatever thoughts may happen along. When sitting in meditation, you become like the gracious host of a party. You want to know who is at the party. But it’s a relaxed and welcoming party, a come-as-you-are party, so whatever thought opens the door and enters is not judged for doing so, for being there.
Try to do this with your awareness in meditation: put your energy into breathing and your awareness into your thoughts. You mildly curious to discover which thought decide they want to come to the breathing party. You don’t need to puzzle through why they are there. Just recognize that they are.
Most importantly: if you are breathing and sitting in stillness and silence, you are already doing the right thing. Keep doing it and amazing things will happen.