The first day of summer is the longest day of the year but it is rarely the hottest due to seasonal lag. The extra daylight is heating the atmosphere but is also being absorbed by the earth and water. It won’t be for another month or so when the earth and water reach equilibrium with the atmosphere and start releasing back the heat they had been storing.
And that is why July and August have the reputation for being the hot months rather than June.