Use a screwdriver or short length of wire to short between the big 12v terminal on your starting solenoid & the small control lead on the solenoid (which is coming from your key-switch). If your engine starts, then your problem is in the wiring through your key-switch.This problem has appeared on this forum many times. It’s because Yanmar runs all the current for the starter solenoid (which can be several amps) up to the control panel, through the key-switch, & back down to the starter. A bit of corrosion in your wiring contacts & there won’t be enough voltage available to throw your solenoid & engage your starter.You can clean your contacts, & that will last a while, but probably better is to add a small 12v relay down by the starter. These can be found at any car-parts shop for under $10 & can usually handle 40A. It’s usually a 1″/25mm cube with 5 spade connectors coming out the bottom & sometimes a mounting tab on the top (do NOT get another starter-solenoid).Take the key-switch lead off the solenoid & connect it to the coil of the relay. The other side of the coil goes to a ground connection. The Common goes to 12v, usually the big connector on your solenoid, & the Normally Open (NO) goes to where you took your key-switch wire off the solenoid. The NC isn’t used.Now your key-switch energizes the relay, which energizes the solenoid, which then fires up your starter & away you go.