The Sun's average brightness varies over time, and the changes can affect global surface temperature. But long-term changes over the period of human-caused global warming are minimal.
Global average surface temperature in July—the hottest month of the year on average—set a new record in 2021. It's virtually certain that the year will go on to become one of the ten warmest years in the historical record.