It’s very natural here on Earth to equate the word “mass” with the word “weight.” In fact, in our everyday lives, we can usually get away with using the two terms interchangeably. A massive thing is also going to be heavy.
It’s actually more accurate to define mass as “how much work it takes to push the thing down the road.” Again, very similar to “weight,” just a subtle distinction.
If I’m trying to push an elephant on roller skates down the road, and attain a speed of, say, 35 miles per hour, I have to do a lot of work.
I can either do this work all at once, maybe by firing the elephant out of a cannon, or I can spread the work out over time, pushing the elephant gradually faster and faster until the desired speed is attained.
Later, I can calculate how much work it took to get my elephant up to speed. (There are measurements for this stuff like joules and newtons.) In the end, I will find that, regardless of my method — either shooting the elephant out of a cannon, or slowly pushing it — the amount of work required to reach 35 miles per hour was exactly the same. It takes a certain, specific amount of work to get an object of a certain mass up to a certain speed.
With a massless object / particle like a photon, there’s no work required at all. The photon does not have to “explode” out of its flashlight as though it was shot from a cannon, it does not have to gradually accelerate over time, it’s already there. The “work,” in a sense, has already been done. That is also the reason photons are always moving at 300,000 km/s. They never speed up or slow down, they pop into being already traveling at the speed of light.