
Hey friend, I have a few suggestions for your problem:
1. It could be the fuel pump. Because it's running with a low fuel level, it overheats and stops working. This is a common problem with pumps submerged in the tank since they use the fuel as coolant.

2. It could be the temperature sensor.
What happens is that if it's faulty, it can tell the ECM (engine control unit) that the coolant is at a high temperature (what we understand as the engine temperature), and that's why the control unit doesn't start the vehicle.

3. It could also be the ignition coil. Due to overheating, the coating on the primary or secondary windings wears down and goes into a faulty state. When it's hot, it doesn't respond, and when you try to start it, it only does so

partially. Does this only happen when you stop the engine, or when it reaches a high temperature and stalls while driving?
Well, I hope these tips help you, and good luck with it.