First, let's check how true it is that the sun pulls the moon twice as much as the earth. Let's use for this the law of universal gravitation, known to the majority since school.
Substituting here in turn, first the masses of the Sun and the Moon, as well as the average distance between them, and then the masses of the Earth and the Moon and the average radius of the Moon's orbit, we will see that the Sun really attracts the Moon 2.2 times stronger than the Earth.
For an unprepared person, the question arises: why, then, does the Sun not pull the Moon towards itself, away from the Earth? He sees a serious contradiction here, which unscrupulous bloggers use to "prove" the fallacy of the law of universal gravitation and attract more readers.
At the same time, these bloggers are simply silent about the laws of celestial mechanics or do not know. The fact is that in order for the Sun to pull the Moon away from the Earth towards itself, the Sun and the Earth must be at rest, that is, they must be nailed to the firmament, and in the Earth-Sun-Moon system, no external forces and at the moment of the appearance of this system, the bodies should not have any velocities and accelerations.
In reality, none of these conditions are met. The Earth revolves around the Sun in the same way as the Moon, and the force of gravity acts on it in the same way.
This can be well illustrated by the following rather crude analogy: let's say you (Earth) are riding a high-speed train (Sun) and there is a cup (Moon) on the table in your compartment. The train acts on you and the cup with different forces, but gives you both the same acceleration. Thanks to this, the enormous force with which the train acts on the cup does not in any way prevent you from taking it and taking a sip, despite the fact that your strength is much less than that of a train.
It is the same with the planets. According to the same law of universal gravitation, one can calculate the accelerations that the Sun gives to the Earth and the Moon. The difference between these accelerations will be negligible compared to the acceleration that the Earth gives to the Moon, therefore the Sun cannot pull the Moon away from the Earth.
If we consider the issue more globally, it turns out that the Moon revolves more around the Sun than around the Earth. The earth only keeps the moon close to itself. If we abruptly remove the Earth from the Solar System, the Moon will still not fly to the Sun, but will revolve around it in the Earth's orbit.