You may have been thinking that the coldest part of the day is just before sunrise, but it’s not always that way.
The reason that the coldest part of the day occurs at this time is because it takes the Earth’s surface a long time to receive the most incoming solar radiation (which is called “solar radiation”). Once sunrise starts, the sun will still take a while to get high enough in the sky to reflect its rays back into space.
But once the sun is at that high point, it radiates its heat at a much faster rate than it can absorb and this causes temperatures to rise.
Eventually, the sun starts to set and it also begins to radiate its heat at a slower rate. Once the sun has set, the surface of the Earth loses its heat radiation until it can start to get new solar energy again.
This process of evaporation, dissipation and condensation happens continuously throughout the night until the sun is up in the morning, which is the point at which it starts to radiate again. But even then, it will take a while for temperatures to rise.