Earth's gravity is indeed strong enough to hold helium, but the reason helium is not retained in the Earth's atmosphere in significant quantities is primarily due to its low atomic mass and high thermal velocity.
Helium is the second lightest element in the periodic table, with a very low atomic mass. Its low mass means that helium atoms have high thermal velocities at Earth's atmospheric temperatures. As a result, helium atoms can reach speeds that exceed the escape velocity of the Earth, which is about 11.2 kilometers per second (6.95 miles per second) at the Earth's surface. When helium atoms reach these high velocities, they can overcome the gravitational attraction of the Earth and escape into space.
Additionally, the Earth's atmosphere consists mainly of nitrogen and oxygen, which are heavier gases compared to helium. Helium is less abundant in the Earth's atmosphere and is primarily obtained as a byproduct of natural gas extraction or from other sources such as helium-rich deposits. While helium can be found in trace amounts in the Earth's atmosphere, its concentration is relatively low due to its tendency to escape into space over long periods of time.
In contrast, gases like nitrogen and oxygen have higher atomic masses and lower thermal velocities, making them less likely to reach escape velocity and more likely to be retained by the Earth's gravitational field.
Therefore, it is not a matter of Earth's gravity being insufficient to hold helium, but rather the combination of helium's low atomic mass and high thermal velocities that allow it to escape into space more readily.