Could be both! Try revving the bike with the headlamp on. If the headlamp goes brighter then the alternator is giving out some charge. Next step is to see exactly how much charge. If you can borrow or buy a multimeter (as cheap as a Fiver), you can check (on the Volts DC range) how many volts are going into the battery at the connections with the engine running. Black lead to -ve terminal, red to +ve. Should be around 13.5 volts. If it reads 12 then you have a charging problem or your battery connections are not good enough. It’s worth taking them off and cleaning them up with a bit of fine wet or dry paper anyway as it’s a common fault.
Let us know what you find, hope this helps.