Engine will restart after sitting 30 minutes

I have a 99 Cougar that will randomly not want to start after driving it. If it sits for about 30 minutes, it will restart. It doesn’t appear to be the fuel pump. Need help before going back to school with this car.