I presume you tried charging the battery before asking a question.
One usually measures the battery somewhere between the battery terminals and the controller.
This requires a DVM or VOM and a couple of alligator clip leads. If your red/black wiring is internal, take the bike back to the dealer you bought it from for service.
48 v battery should read above 41 v. 36 volt should read above 30 volt.
Some batteries have an internal bad weld that only shows up on the road while being shaken. This requires a meter mount where you can read the reading as you ride.
Some battery connectors requiring spring pressure may require cleaning or spring replacement. Some extra wiring connectors between battery & controller may require replacement.
More rarely a bad joint in the controller can cause it to go dead.