John, you want to diagnose first and make suitable repairs based on a firm diagnosis. Don't try to fix things by throwing parts at it.
Problems with the Yanmar charging system in the wiring are well-known and running topics for discussion. You need to download TM1591 and study the electrical section.
Get out your trusty multimeter (VOM). If the wiring on your tractor is factory standard, there is a plug with two wires in it between the alternator and voltage regulator. Check for
around 30 volts AC (note, AC, not DC) between the wires with the tractor running at high idle. That plug connection is notorious for corroding and burning up. Clean the contacts thoroughly and use Caig Deoxit D-5.
Check voltages at the voltage regulator, starting with the alternator AC. The regulator uses a separate voltage sense input. That needs to have battery voltage on it. Then, check for output at the output terminal, which is separate from the sense wire. Also, make sure that the regulator is grounded to the frame, and that the ground strap across one of the motor mounts is present and has good metal-metal contact. Clean the connections to the voltage regulator, and use Deoxit on assembly.
On a properly-operating Yanmar 3TN68 charging circuit, with the ignition switch on, you'll have battery voltage on both the sense and output terminals, and that should be a nominal 12.6 volts. With the tractor running, you should have a significant voltage rise, to around 14 volts, on both of those terminals, as well as AC from the alternator at the voltage regulator.