What causes earths rotation?
I suppose you are referring to Earth’s 24hr revolution rather than its 1year path around the sun (that would be caused by the sun’s gravity imposed upon Earth)? Earth, like all the other planets in the solar system, coalesced from material that was left over from the building of the sun. This material circled around the sun in a disc and the material coalesced into planets because of the gravity of the material. So this moving material became denser and denser and rotated not only around the sun but also around its own centre of gravity. Purely statistically, the paths of the single particles that are coalescing would not point directly to the centre of gravity but elsewhere, so that those particles rotate around the centre of gravity. Upon coalescing further, a solid body is formed which ends up being revolving because of the law of conservation of angular momentum. That is why all the planets are revolving and I think they all revolve in the same direction because they originate from
The Earth’s rotation can be traced back to the dust cloud from which it was formed, whenever a cloud of particles collapses it naturally rotates. This is why the Earth is rotating on its axis around the sun, and the sun is rotating around the super massive black hole in the center of the milky way galaxy. It is also theorized that the galaxies themselves rotate in clumps etc.