Leave the 2 wires from the dynamo hooked up to the harness to check your charging system.
To test the dynamo, unplug the 2 wires, set DVOM to AC volts and read it. You're looking for about 37-39 volts at rated engine RPM (full throttle). Dynamo's are real simple. They rarely fail, and when they do it's usually the bearings...easily replaceable (and cheap).
Back to the charging system. This system is an external voltage regulator. You'll have I think 5 or 6 wires (most are 5). 2 go to the dynamo. 1 goes to the battery (hot all the time). One is ground. The other goes to key switch, hot in run position only.
It is not common for regulator to die, and they are kubota-only parts, and a little expensive so you'll test AROUND the regulator before deeming it "bad". In other words, at the connector you'll find a single red wire, usually 2 blues or whites (they are 2 of the same color, those go to the dynamo), a white/red and a black. If you have a manual, you may find that it's showing different colors at the regulator connector. You'll want to test the 2 wires that have the same color, engine running, connector disconnected, and test for AC voltage at the harness side of the connector. Should be the same, or very close to what you saw at the dynamo. Then test for +12v, key off, at the battery wire (usually red but not always). Then test to see if the trigger wire is seeing +12v from the key switch in the run position only. And finally check for a GOOD ground (0 ohms between the ground wire and a bare bolt or the tractor's chassis). If all those tests end up "good", your regulator is "bad". If one of those tests is bad, find out why...usually wiring harness problem or a key switch problem, most commonly in our case, harnesses and connectors get corroded.
Again all those wire colors are off the top of my head, so be sure to check your wiring diagram. Sometimes the dynamo wires at the regulator connector are yellow.