The time it takes for light to travel from a celestial object to Earth depends on the distance between them. The speed of light in a vacuum is approximately 299,792 kilometers per second (186,282 miles per second).
Proxima Centauri is the closest known star to our solar system, located about 4.24 light-years away. A light-year is the distance that light travels in one year, which is roughly 9.46 trillion kilometers (5.88 trillion miles). Therefore, it takes light from Proxima Centauri approximately 4.24 years to reach us because that's the time it takes for light to travel across the vast distance between our star and that star.
On the other hand, the Sun is the star at the center of our solar system and is relatively close to Earth, about 149.6 million kilometers (93 million miles) away on average. Since light travels at an incredible speed, it takes only around 8 minutes and 20 seconds for light from the Sun to reach us.
The vast difference in time is due to the significant disparity in distance between Proxima Centauri and our Sun. Proxima Centauri is located over 40 trillion kilometers (25 trillion miles) away from us, while the Sun is a mere 150 million kilometers (93 million miles) away.