Our thoughts come from our influences, (who/what we voluntarily choose to interact with and who/what we involuntarily experience) and the environment around us. We can also choose to be introspective to bring certain thoughts about on our own accord, as well as choose which thoughts to dwell on and which to dismiss.
We experience something through 1 or more of our senses, which triggers a thought. On the flip side, we can also choose to be introspective in our time alone (without a direct influence) and we can go off searching for things/topics to think about, because we were created to be thinking, rational and conscious beings.
Now if you want to get into the thoughts that don’t come from us and that are completely irrational/unnatural, that’s a whole different conversation…