Welcome ! for one reason or another, one cylinder isn't firing all the time. It could be a dirty carb, or some other fuel supply issue. Next time it starts running crappy, remove the spark plug wire while running. Then the other. One will likely have no effect, the other stalls the bike. Once you've identified the ineffective cylinder, remove the spark plug, and report here with the color , or even a picture if you can.
It's also pretty cheap to just try a new spark plug. If that solves the problem, it wont solve it for long. But at least you'll be moving towards finding the actual issue.
It's also pretty cheap to just try a new spark plug. If that solves the problem, it wont solve it for long. But at least you'll be moving towards finding the actual issue.