Guys mine did the exact same thing two seasons ago.
It started great. Then sputtered and cut out. Did this a few times. I was all over the place fault finding.
It then wouldn’t start at all until I let go of the key then it would sputter.
The very next day it started no problem. Took it out and started sputtering and cut out. Started again straight away.
Back at dock was all fine. Next weekend it coughed and sputtered.
Local Merc guy said straight away. Diz cap and rotor.
I just cleaned it and it didn’t fault again. Replaced it later in the season just to be sure. Loads of guys across here had the same thing, especially after winter storage. Damp, cold, freezing, thawing, freezing, damp cold, wee bit warm. Typical scotttish weather accelerates the process of the crap cap