One part of Buddha’s Noble Eightfold Path is “Right Thought”.
“It is not necessary for all thoughts to cease in meditation before one begins Vipassana. Thoughts may still persist, but if awareness is sustained from moment to moment, that is sufficient to start the work.
Thoughts may remain, but the nature of the thought pattern changes. Aversion and craving have been calmed down by awareness of breathing. The mind has become tranquil at least at the conscious level, and has begun to think about Dhamma, about the way to emerge from suffering. The difficulties that arose on initiating awareness of respiration have now passed or at least have been overcome to some extent. One is prepared for the next step, right understanding.”
p. 88 of Hart’s The Art of Living -Vipassana Meditation as taught by S. N. Goenka.