Firstly, $\frac {m^3-m}6 \in \Theta(m^3)$, because $\Theta$ is loose enough to ignore the constant multiplier and a small $-m$ term.
Secondly, the number of pyramid numbers under $n$ is equal to the largest $m$ such that $\frac{m^3-m} 6 < n$. The exact form is unpleasant to solve, but to get an estimate we can easily solve $m^3 < n$ which gives $m < n^{1 \over 3}$.