Simple Harmonic Motion is a projection of a uniform circular motion with radius equal to the amplitude. You can see this video for understanding it better.
Now, imagine this figure
For uniform circular motion the radial acceleration (called centripetal acceleration) is given by $$ a = \frac{v^2}{r} \\
~~~~~~~~~~~v = \omega^2 r ~~~~~~~~~~~~~~~~~~( \textrm{$\omega$ is the angular velocity}) \\
a = \omega^2 r $$
But as I said this is the radial acceleration (the acceleration which is pointing towards the center). Since, our aim is the projection and there is only the vertical acceleration there, therefore the vertical acceleration for our uniform circular motion is $$ a_{vertical} = - a \sin \theta \\
a_{vertical} = - w^2 r \sin \theta \\
a_{vertical} = - w^2 x $$
I have put the minus sign because this acceleration points downwards but the accretion in our SHM (in this particular case)is upwards for the moment we are concerning.
So, the vertical force in the uniform circular motion is $$ \mathbf{F} = -m \omega^2 x $$ Now, we will equate this equation of force to the force that you have written $$ -m \omega^2 x = -k x\\
k = m \omega ^2$$ .
So, you see $\omega$ is just angular velocity in our uniform circular motion and it need not be an universal constant, it depends on the velocity $v$. The $\omega$ can also be thought of as an angular frequency.
Hope it helps.