The reason for this depends on where planets are orbiting. For instance, planets that are closer to the sun, like Mercury and Venus, have shorter years compared to Earth. Also, planets that are far away from the sun have longer years compared to Earth.
Planets that are closer to the sun orbit faster compared to others because of the pull of the sun’s gravity. While it takes the Earth 24 hours to make a complete rotation in a day, it is not the same for other planets. For instance, it usually takes about 1408 hours for Mercury to make a complete rotation in a day.
Venus, the second-closest planet, makes a complete rotation in 5832 hours. On the contrary, Uranus and Neptune use 17 hours and 16 hours to make a complete rotation, respectively. While there are 365 days in a year on Earth, it takes Mercury 88 days to make a complete revolution.