Does the sun rotate? Solar rotation science

The sun’s permanent position in the sky, as well as the fact that the Earth and other planets revolve around it, may give the impression that it is stationary and does not move or rotate.

However, we have come to realize that the sun has been rotating since the 17th century. Like the majority of the planets in the Solar System, this rotation is counterclockwise, but in addition to being much slower than the Earth’s rotation, the Sun’s rotation is more complex.

How do we know that the sun is rotating?