So far what I had understood about potential energy is that it is defined for a Systemsystem of particles (With atat least two particles) with forces acting towardsacted by the particles on each other of same magnitude and opposite in direction as, $$-W_\mathrm{conservative} = ΔU.$$
For exampleinstance in case of gravitational potential energy ,we we only consider work done on small body as there is negligible work done on the earth.
But in casecases such as : The left side ofthe following example, the concept is not completely clear. Consider a massless spring, the left side of which is attached to the wall, and there is a block attached to the right side of the spring.
If we consider the block +$\cup$ spring as our system, then the the net work done by internal forces would be zero ,. So what is increasing the potential energy of the system then as we stretch the spring?
I referAs per one of the answers to this question - Questionthis
According to some answer question, I thought Iit seems we need to consider the earth also intoto be a part of the system and Springthe spring just stores potential energy likesimilar to the gravitational field while not really being the part of the system.
Is this reasoning correct? If not, please help me clear these doubtsclarify the concept.