It stops after it has been on a few min. What could this be

first time this has happened will crank over but won't start 16,000 miles certified car 5 year bumper to bumper warranty

bought a 2011 kia sorento traded in 2006 sorento loved that car got a small ping on windshield and now have a crack across entire windshield is this a defect