If it is fuel injected and hunts when it does start I would check for

An Air leak into the inlet, allowing unmetered air past the throttle body.
there should be a crank and or cam position sensor which tells the ECU the engine speed and position to decide the correct time to inject and spark.

If one of these is faulty or is not getting a good connection you will get all sorts of running issues.

Is there a side stand switch to prevent the engine starting with the stand down?

Check the switch and any connections to the switch for corrosion etc.

Where is the bike and exactly what make/model is it?


Mark