Whilst most explanations of the tides “it’s the moon’s gravitational attraction” are readily accepted by all, there’s a very significant issue that often causes a lot of confusion. The trouble is, the tidal bulge is not only on the side facing the moon ie. the water is not simply “pulled up” by the Moon – there’s a lot more going on, as you can clearly see in this screenshot of the lovely simulation at: https://www.schoolsobservatory.org/discover/sims-cals/tidesim
In order to address the issue we need to understand a few things:
Lets think about 1 first:
The moon’s mass is about 7.35 X 10^22 kilograms, and the mass of Earth is 5.97 X 10^24 kilograms. The ratio Mm/Me, then, is about 0.0123. (In other words, the moon weighs roughly 1.23 percent as much as Earth.) Therefore, the distance from Earth to the system’s center of mass is only about 0.0123 times the distance from the moon to the system’s center of mass. With a typical distance of 384,400 kilometers separating Earth and the moon’s centers, that works out to a center of mass that is roughly 379,700 kilometers from the moon’s center and about 4,700 kilometers from Earth’s. (Note that 4,700/379,700 = 7.35 X 10^22/5.97 X 10^24, in agreement with the formula De/Dm = Mm/Me.) Earth’s radius is about 6,400 kilometers, so the center of mass for the Earth–moon system lies inside the planet, about 1,700 kilometers below the surface and it is this point around which both Earth and the moon orbit as as they follow their combined path around the sun.
It is usual for us to simplify this to just the movement of the moon around our planet, treated in true geo-centric fashion as unmoving and inviolate. In this instance, the slight wobble of the Earth around this point is very significant.
Now Point 2:
Newton’s first law states that, if a body is at rest or moving at a constant speed in a straight line, it will remain at rest or keep moving in a straight line at constant speed unless it is acted upon by a force. This postulate is known as the law of inertia. In order for the Earth to orbit this common center of gravity, there must be a force upon it – this is provided by the gravitational attraction of the moon, and likewise the reverse is true.
So, now that we have the basics covered we need to think about the water on Earth. Water is free to flow and slosh around and it even does this on a planetary scale. So, back to the usual description; Plainly the gravitational attraction between the Earth and the moon is strongest on the side of the Earth that happens to be facing the moon, simply because it is closer. This attraction causes the water on this side of Earth to be pulled toward the moon causing a “bulge” of water on the near side toward the moon. In terms of inertia, the gravitational force exceeds the inertia and the water is pulled toward the moon, causing a “bulge” of water on the near side toward the moon.
On the opposite side of the Earth, or the “far side,” the gravitational attraction of the moon is lower because it is farther away. Here, the water continues in a straight line, for a little longer until the combined gravitational attraction of the Earth and the moon is able to overcome the inertia therefore forming forming a second bulge.
In this way the interaction of gravitational attraction and Newtonian inertia create two bulges of water. We have ignored spring and neap tides however, when you factor in the same effect due to the position and rotation around the Sun you soon see how complex an apparently simple thing becomes.
There is an excellent description of this effect, explained in a different fashion here: https://noc.ac.uk/files/documents/business/Double-Bulge-Explanation.pdf
I recommend you check it out!