If suns gravitation is more than earth.so why doesn't the moon revolve around the sun
The simple answer is that the sun's gravity produces the same acceleration on both the Earth and the Moon. The Sun is pulling both of them along, but they are falling together.
You may imagine two skydiver jumping out of a plane at the same time (and we'd better ignore air resistance). They are subjected to gravitational forces from the Earth that vastly larger than the forces between them, but that doesn't rip them away from each other because they both experience the same acceleration