In which case can we say that the body has energy?

If a body or several bodies interacting with each other (a system of bodies) can do some work, then they say that they have energy.
About the body, through which work can be accomplished by the forces acting on it, they say that it has energy.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.