The best explanation for the variation in surface temperatures between 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 thick atmosphere that creates a strong greenhouse effect, trapping heat and resulting in much higher surface temperatures compared to Mars, which has a very thin atmosphere that is less effective at retaining heat.