At rest, nothing moves because the forces cancel: the spring pulling up equals gravity pulling down. Spring force is stiffness times stretch; weight is m g. Set them equal at the deflection you want and solve for stiffness: stiffness equals m g over x. Half a kilo, ten centimetres of stretch — that's 0.5 times 9.81 over 0.10, about 49 newtons per metre. A softer spring sags too far; a stiffer one barely gives. The simulation just lets you watch that balance find itself.
Spring force vs weight, settling to balance.