Welcome to the forum!
Your issue more than likely a charging system failure. Could be as simple as a bad grounds or battery due to the vibration our bikes produce. Cheap batteries wont last cause of this. Next things are the voltage regulator, and the stator. How you test these is pretty simple.
First get your battery charged pretty good or replace it if old. Check the ground at the battery, battery to rear subframe, under air box cover and lower air box cover is the main engine to frame ground. This should allow the bike to start if battery and ground are good. Once running there are 2 eletrical connectors that run under the left side air scoop, one goes to the voltage regulator mounted to the from sub frame the other goes into the primary cover behind the rear jug, you will want to test here this is the stator. Get multi meter switch to AC volts and measure between the 2 pins, at idle 20-30volts ok, at 3-4k 70-80volts is what you wanna see. If this is not the case bad stator. If checks out connect everything test with DC volts at battery, over 2krpms 13.50+ is what you should see. If lower the voltage regulator is bad.
I suspect your battery or a ground issue because you didnt get a check engine light. At least did not state such. Good luck hope its a simple fix