The electromagnetic spectrum refers to the range of all electromagnetic radiation types, which includes various wavelengths and frequencies. This spectrum encompasses many forms of energy, including radio waves, microwaves, infrared radiation, visible light, ultraviolet radiation, X-rays, and gamma rays. While part of the electromagnetic spectrum includes the portion of energy from the Sun that reaches the Earth (particularly visible light, ultraviolet, and infrared radiation), it is not limited to this; it encompasses all kinds of electromagnetic radiation.
Therefore, the correct perspective would be that the electromagnetic spectrum includes a wide range of electromagnetic radiation, not just energy from the Sun.