Strange start issue

For the past 2yrs on some warm to hot days when I leave my car parked at work, I have a hard time starting my car. Its in direct sun all day. So today it was about 85 out outside temp reads 100 due to the asphalt. Took me about a min to get it started. Strange thing it happens on some warm to hot days and only when its parked in direct sun. Never any other time of year. I thought I heard a few years ago (if I’m not wrong) that it some sort of sensor, but I can’t remember.