It seems like a contradiction.

Mercury is the closest planet to the Sun, so it would be natural to assume it is also the hottest.

In reality, that title belongs to Venus, where surface temperatures are hot enough to melt lead.

The difference isn't about distance from the Sun but about what happens after sunlight reaches a planet.

While Mercury has almost no atmosphere to trap heat, Venus is wrapped in an incredibly dense blanket of carbon dioxide that acts like a giant thermal trap.