Have you not considered your Lord - how He extends the shadow, and if He willed, He could have made it stationary? Then We made the sun for it an indication.
Then We hold it in hand for a brief grasp.
In these verses, Allah describes the shadow and how He changes it throughout the day.
(Have you not considered your Lord - how He extends the shadow) during the morning hours when the shadow is long.
(and if He willed, He could have made it stationary?)
"it" refers to the shadow. There are two ways of understanding it:
(1) He could have made the sun stationary. The shadow being stationary is an indirect reference to the sun being stationary.
This is similar to how Allah says: "Have you considered: if Allah should make for you the night continuous until the Day of Resurrection, what deity other than Allah could bring you light?" (28:71)
(2) He could have made the shadow stationary even while the sun moves. Meaning, Allah could have disconnected the shadow and the sun. The shadow moving itself has benefit in it for us, and if Allah had made it stationary, that would have been problematic.
(Then We made the sun for it an indication.) The sun is an indication for shadows like light is an indication for darkness. If light didn't exist, no one would know what darkness is and vice versa. If the sun didn't exist, there would be no shadows.
(Then We hold it in hand for a brief grasp.) This is a reference to noon when the shadow is shortened for a brief time, or it is a reference to the night.
Also see the Tafsir Ibn Kathir and others available online.