This is a great question, but is probably impossible to answer except speculatively. The problem is that the really basic concepts are almost as old as writing. By the time of Ahmose's textbook (about 1550 BC, more than three and a half millennia ago), he assumes that the reader already knows how to add and subtract, and already knows the then-standard symbols for those operations (a pair of legs walking forward and backward, respectively). The same is true of the Moscow Mathematical Papyrus, dated three centuries earlier. So we just don't have any material from the dawn of these concepts.
Early mathematical writings tend to be completely concrete. They present what we would now call "word problems", usually with sketch solutions, and are clearly intended to *teach* the reader how to solve problems. The author already knows, and does not explain how they came by the knowledge.
The first book where the author seems to start sharing thoughts with the reader is Euclid's *Elements*, from about 300 BC. And even there, Euclid is very impersonal, saying things like "To show that if a triangle has two equal sides, it must also have two equal angles, observe that ..." In other words, again, the author is being a teacher, already knows the material, and does not reflect on how he learned it.
You might be interested in reading W. W. Rouse Ball's *A Short Account of the History of Mathematics*. It's out of copyright and available free online in various places, and even has a free audiobook version from Librivox. If you want to pay actual money for star power, you can hear actor Tony Shalhoub ("Monk") read it for Audible.com.