Radiation from the sun is of a relatively short wavelength. This passes fairly easily through our atmosphere and is absorbed by the earth, then radiated at a longer wavelength*. This longer wavelength is more readily absorbed by “Greenhouse gases” such as Carbon Dioxide, resulting in a warming effect in the atmosphere.
Global temperature has shown a more rapid warming recently than for earlier periods**, whilst the sun’s output has not shown a similar change in output***.
*”Shortwave radiation budget of the Earth: Absorption and cloud radiative effects”