Thoughts are ways of dealing with feelings
In the primary case, in the standard situation, feelings come first. Thoughts are ways of dealing with feelings – ways of, as it were, thinking our way out of feelings – ways of finding solutions that meets the needs that lie behind the feelings.
The feelings come first in both a hierarchical and a chronological sense. A little neonate (newborn mammal) has no thoughts to speak of, to begin with; it is a little bundle of feelings. Thinking derives from learning, that is, from experience.
The apparatus for thinking then works on the material we have internalised, from the solutions we’ve experienced, as to how our needs can be met in the world. These solutions are, of course, initially provided by caregivers. (That is why parenting is important.) On this basis, thinking gradually develops and teaches us how to manage our feelings – how to solve the problems that feelings represent.