The other posts linked on the closing of this question may seem to indirectly (or somewhere within the answer) provide an explanation. However, they don't answer this specific question at my level. Please note that I am asking 1. the definition of period, and 2. how that divides $p - 1$ as a direct consequence of Fermat's little theorem.
I found this in here, and as it is given, the period of the exponential function $f(x) \equiv a^x \pmod p$ divides $p -1$, presumably with $p$ being co-prime to $a \in \mathbb Z$ (?) by Fermat's little theorem.
I see that for an integer $a>0$ and for a prime $p$ the sequence $1,a,a^2, a^3, \dots \mod p$ is periodic, so for instance:
For $a=2$ and $p=7,$ the sequence would be $1,2,4,1,2,4,\dots$, so I presume the period is $3,$ which indeed divides $p - 1 = 6$. But I can't find a formal definition for period (tangentially similar to order, but not the same).
Also, by FLT, $a^p \equiv a \pmod p$ or equivalently (if $a$ and $p$ are coprime, $a^{p-1}\equiv1 \pmod p.$
But how do I prove that from the above it follows that period $ \mid\ {p-1}$?