Answer: yes, a change in mass affects the total, kinetic and potential energy.
Explanation: The formula that defines the total energy of a loaded spring in simple harmonic motion is given below as
E = 1/2 kA²
Where E = total energy
k = spring constant = ω²m
A = amplitude
As we can see from the formulae that the total energy is dependent on the spring constant (k) which in turn depends on the mass of the loaded spring.
Hence an increase in the mass ( with a constant amplitude) will cause a change ( increase) in the spring constant which in turn changes ( increases) the total energy of the system.
The kinetic energy is given as
K.E = mv²/2 where k = ω²m
As we can see, a change in mass of the loaded spring has a direct effect on the kinetic energy.
Potential energy is given as
P.E = kx²/2 where k = ω²m
Since the value of k is directly affected by the mass and the potential energy is affected by the spring constant (k) hence the potential energy is dependent on the mass indirectly hence any change in mass affects the potential energy too