There could be a couple of reasons.
I had a silverado about 6 months ago and it was doing something similar.
I would check the battery cables.
The nut/bolt feels like it was tight,but i grabbed the cable and it would
move a little.
I took the cable off of the red/positive cable and it was all corroded.
Cleaned the cable and it started fine after that.
When it doesn't start and cables are okay,i would check voltage at
the starter(small wire) to see if it is getting voltage when someone is turning the key