This question already has an answer here:
What is the mass of a photon moving at the speed of light?
And if it does not have mass, how is it affected by gravity?
Also why does Einstein's general relativity support that a gravitational wave must travel at the speed of light?
I'm just an A-level student. So, I would appreciate it if you could explain it as idiotically as possible.