^^^This.
The sun's energy moves through space, but if there's no matter for it to be transferred to energy itself has no temperature.
Space isn't a total vacuum, but it's close enough that the sun's energy can't really "heat it up" the way it does, say, the Earth's atmosphere. In other words it's not about the sun, it's about what its energy is or isn't hitting.
You are clo9ser to the truth than Old Rocks, but I will be nicer to you because you do not claim any expertise in science.
The temperature of space between the Earth and the Sun is warmer that the space between Mars and the Sun. The reason the Earth is warmer than the space surrounding it is because the Earth is denser, and has a layer that serves as a blanket to insulate it from the colder space. Additionally, the Earth is warmed internally, which has a small, but significant, effect on the temperature.
The very fact that heat moves through space at all proves it is not a vacuum, because a perfect vacuum would be perfect insulation.