Let us start with the moon. Its rotation has already slowed down to the point where one face of the moon is facing the earth permanently.
The tides on the moon have taken the energy of rotation and dissipated it. Angular momentum is conserved so the angular momentum of rotation has gone into the angular momentum of revolution around the earth.
The earth is spinning and energy is being given to the tides. So the rate of rotation of the earth is diminishing. It is losing rotational energy.
As angular momentum is conserved then this is transferred to the orbit of the moon. The orbit of the moon gets an hour later each day so it is orbiting in the SAME DIRECTION as the earth is rotating.
Hence as the earth slows down some of its rotation energy is given to the moon. It gains altitude and moves further from the earth. At this greater altitude its rate of rotation around the earth also slows.
Now we get to the sun. It also induces tides in the earth. This also reduces the rate of rotation of the earth.
What I don’t know is the rate of revolution of the sun.
If it was spinning then the tides induced would alter the orbit of the earth around the sun.
I don’t know the facts for this. However I have already stated what WOULD happen if the sun was spinning.