There is an over-heat sensor/switch in many starters. It’s moubted in the end closest to the brushes. There should be 2 wires plugged into it. I would bet you it’s either unplugged or you have a broken wire between the starter and the ecm.
In a 2015 it will be done by the CECU based off time spent cranking. Takes 2 or 3 mins before you can crank again