Voltage (main unit volts V) multiplied by current (main unit ampere A) corresponds to power (main unit W watts)
Power multiplied by time (main unit seconds S) corresponds to energy (main unit joules J) 1WH=1W*3600 seconds=3600 J
The capacity of the battery is equal to the discharge current multiplied by the discharge time
Therefore, the discharge capacity multiplied by the voltage is the total energy of the battery
The energy of a 37 Ah 24 V lithium battery is
37WH*24V =888 WH