You should go to a "major chain" auto parts store (Autozone, Advanced, Pep Boys) and ask (when they are not absolutely swamped) to have your battery/starter/alternator checked. It's free and can tell you a lot. My guess is that the battery is marginal. It takes a lot to start a car when it is really hot - something about efficiency loss with the heat. If you need a battery make sure it has sufficient amperage. Regular "gasser" batteries are about 60 to 70 amps where a diesel needs 85 or so.
Also, they can check (but not clear) for any "check engine light " codes that may have occurred in the car.