explain why the string stretches while the system is rotating?

2 answers

What system?
How do you expect us to know what you are talking about?
As the system rotates, the mass is moved in a circle which means that there is a net force acting on it and is directed towards the center. That force is provided by the spring which has to be streched in order to provide the force needed.