why doesnt sun attract earth towards it

1 answer

It does. Were it not for the attraction, the earth would go spinning into the wild blue yonder. (Of course, the universe is expanding, anyway.)