When boiling a liquid the liquid closest to the heat source rises. Why does it rise?

When a liquid is boiled, the heat source causes the molecules near the bottom of the container to gain energy. As a result, these molecules increase in kinetic energy and move more rapidly, leading to an increase in their temperature.

When the temperature of the liquid molecules increases, their average distance between each other increases as well due to thermal expansion. This expansion results in a decrease in the liquid's density.

Since the density of the liquid near the heat source decreases, it becomes less dense compared to the liquid higher up in the container. The less dense liquid rises to the surface, displacing the denser liquid, and causing the convection currents known as boiling.

In a nutshell, the heat applied to the liquid causes it to become less dense near the heat source, resulting in the lighter liquid rising to the top.