To turn on its axis once, the earth takes a bit longer than twenty-three hours and fifty-six minutes. This leaves, more or less, four minutes in each day where the earth has already turned on its axis once more than it had the previous day. This is the “sidereal day” definition of a day. Going by this, the days are slightly shorter.
On contrast, it takes about 365 and a quarter turns on the axis to go around the sun once. This is what we call a year, and why there’s a leap year every four years, when an extra day is added to February. This can also be varied by the sidereal days, but that’s too complicated to get into here.