The sun is the primary source of Earth’s heat, so relatively small changes in solar output can affect our climate.

Satellite observations since the late 1970s have shown a slight decrease in the sun’s total energy output. However, instead of cooling, the Earth has warmed over this period.

Also, warming from the sun would heat all of the atmosphere, including the lowest few kilometres (the troposphere) and the layer above (the stratosphere). Observations show that the stratosphere is in fact cooling while the troposphere warms. This is consistent with greenhouse gas heating and not solar heating.

From: https://www.theccc.org.uk/tackling-climate-change/the-science-of-climate-change/climate-variations-natural-and-human-factors/