Isaac Newton, first, suggested that the gravitational attraction between two bodies was proportional to the product of the masses and inversely proportional to the square of the distance between them. Or, simply put; dough attracts dough . Newton gave us a formula to calculate this attraction, and we thank him to this day for it.
However, much later, in the year 1915, a great physicist postulated “Theory of General Relativity”. He was Albert Einstein. He suggested that gravity is not an attractive force between two bodies, but rather the deformation of a tissue that he called spacetime .
I’ll explain it to you with the classic example: If you have a mesh, and you place a marble in it, the mesh will curve, causing any body in it to move towards the marble you placed in the first place. Thus, the Sun, for example, warps space-time causing the trajectories of everything around it (such as the Earth) to be affected.
However, light travels in a straight line … right? Yes. It does. But the space-time in which it travels is curved (exerting gravity). Thus, it seems that light is bent by the effect of this gravity. Or rather, it does; It curves! It is not a matter of perspectives, it is a fact. But in reality, it is traveling in a straight line through the continuous fabric of space-time, which, by the presence of energy (mass of another body), bends.