The best explanation for the varying surface temperatures of Mars and Venus, despite both having atmospheres that contain mostly carbon dioxide, is:
Mars has a thin atmosphere that cannot hold much heat.
Venus has a very thick atmosphere, which creates a strong greenhouse effect, trapping heat and leading to extremely high surface temperatures. In contrast, Mars' thin atmosphere is not effective at trapping heat, resulting in much cooler surface temperatures.