The best explanation for why Mars' and Venus' surface temperatures vary, despite both planets having atmospheres that contain mostly carbon dioxide, is:
Mars has a thin atmosphere that cannot hold much heat.
Venus has a thick atmosphere that creates a strong greenhouse effect, trapping heat and resulting in extremely high surface temperatures. In contrast, Mars' thin atmosphere lacks the ability to effectively trap heat, leading to much cooler surface temperatures.