This could be one of several things. In order to test all of them, you need a small multimeter, you can get on for ten bucks.
First, you need a battery that is fresh and holds a charge. Which means you should charge your battery overnight, and then let it sit for a couple hours. If it drops below 12.4 volts DC or so, it’s shot. A 12 volt battery typically should rest at 12.7 volts DC or so. If it’s shot, buy a new one and charge it. Then install it.
Now start the bike up and check voltage at the battery terminals. It should read in the 13’s at idle and rise to 14.4 to 14.7 volts of Direct Current at 4000 RPM. If the voltage does not rise this far, the regulator/rectifier is shot.
Now, with the bike running test the voltage at the three prong plug that the regulator rectifier plugs into. Check prong A to prong B, prong B to prong C, and prong C to prong A. All of them should be about the same, and 60+ volts at 4000 rpm is an ideal voltage. That’s alternating current, not direct. If one of them is much lower, replace the alternator.