If you double the mass, does the block oscillate faster or slower? What if you double the spring stiffness? Does the starting stretch change the period?
Doubling $m$ slows it down (period × $\sqrt2$). Doubling $k$ speeds it up (period ÷ $\sqrt2$). The starting stretch does not change the period.
The spring pulls back with force $F=-kx$. Newton's second law, with a damping force $-bv$, gives:
$$m\ddot x=-kx-b\dot x,\qquad T=2\pi\sqrt{\frac{m}{k}}\ (b=0),\qquad E=\tfrac12 m v^2+\tfrac12 k x^2$$The period depends only on $m$ and $k$, not on the amplitude. The simulation integrates the equation numerically with a fourth-order Runge–Kutta method, so the energy does not drift.