2015 sportsman 570 shutting off

Trying to fife out the problem with my 570 I flipped it a few days ago but everything is ok runs good starts right up feels normal but I’ll be riding now an out of nowhere big just turns off I try to start is right back up it just runs for a sec an stalls then cranks an cranks an won’t start. Then I left it sit for a few min an fires right up like normal an drives good again. Ben trying all day to figure it out. Please help if you have the knowledge. Thanks.

2015 sportsman 570 shutting off

Trying to fife out the problem with my 570 I flipped it a few days ago but everything is ok runs good starts right up feels normal but I’ll be riding now an out of nowhere big just turns off I try to start is right back up it just runs for a sec an stalls then cranks an cranks an won’t start. Then I left it sit for a few min an fires right up like normal an drives good again. Ben trying all day to figure it out. Please help if you have the knowledge. Thanks.