It's not proved. It's the definition of SHM. The acceleration of the particle is directly proportional to its displacement from the origin and directed towards it. So a = -kx
The ω² comes from solving a=-kx as a sinusoidal function with angular frequency ω. It turns out the constant k = ω²
You'll see this if you differentiate x = A sin (ωt) twice wrt t