https://images.app.goo.gl/P4YtYRLvT5XVcn168
Look at this map of max temperatures and note that the equator runs through a band of relatively low max temperatures: Indonesia, northern South America, and the more southern part of Africa show bands of conspicuous coolness. The hottest max temperatures are in places like southern North America, India, Northern Africa, and Australia; locations that are in fact very far away from the equator.
The max temperatures of a place is caused by many things, such as proximity to water and local wind currents, but one driving reason is relatively simple: because of the tilt of the earth, every day on the equator is 12 hours. North or south of the equator, on the summer solstice, you can get 15 hour days, depending on latitude. The summer is a period of continuously intense solar heating. Again, there are other factors, but the sun is the driving force.