Grizzly having cranking problems!

Hey guys so I was in West Virginia this weekend going in some deep water holes that I always go through its nothing new to my bike well I went in this hole probably 15 times and I stopped turned my bike off and I came back to it a little later and tried to crank it and my instrument cluster had a number 12 where the miles are and the engine light came on when I tried to crank it. All I would get out of it was a click well I got pulled back to cabin and I tried to crank it and it fired up this happened again on our trip in another hole and it wasn’t even that deep I was coming out of the hole and right before I got out it cut off except this time nothing changed with instrument cluster and no engine light came on I got pulled for a little ways then it fired right up. I have no clue what’s going on if anyone can help me with what’s wrong I would really appreciate it.