The best explanation for the variation in surface temperatures between Mars and Venus, 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 leading to much higher surface temperatures compared to Mars, which has a thin atmosphere that is less effective at retaining heat.