Listening to a discussion led by Jordan Peterson about Exodus, I heard someone point out (they were talking about prayer) that “thinking” and “thanking” are etymologically related.
Old English þencan is the causative form of the distinct Old English verb þyncan “to seem, to appear” (past tense þuhte, past participle geþuht), from Proto-Germanic *thunkjan (source also of German dünken, däuchte). Both are from PIE *tong- “to think, feel” which also is the root of thought and thank.
(PIE I assume stands for “Proto-Indo-European“.)
So, maybe the first thoughts we became aware of were thoughts of gratitude.