It could be caused by overheating, mechanical failure, or a combination of both. Immediately pull over to a safe location, avoid restarting the car. Regular maintenance, proper gear shifting, and monitoring the engine temperature can help prevent such incidents