From what I have seen so far, there seem to be two fundamental criteria for considering something to have mass:
- First is that it must have inertia and therefore momentum,
- Second is that it interacts gravitationally i.e. it curves spacetime.
Even when we measure the mass of something, we can't do it directly, we calculate it through measuring its inertia or through its weight i.e. gravitational interaction.
But then this seems to create a contradiction in considering photons to be massless, as photons fulfill both1 these2 criteria. So then the definition of mass has to be different, and if so what is the actual definition of mass? If the definition is as I said, then why are photons considered massless?
For more reference to the questions that this question was built on:
If photons have no mass, how can they have momentum?
How is light affected by gravity?