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.
While Venus indeed has a thick atmosphere that traps heat, leading to extremely high surface temperatures, Mars' thin atmosphere does not provide sufficient insulation, allowing heat to escape into space, resulting in much cooler surface temperatures.