watt hour is the best way imo to measure energy stored. so a 100wh battery can deliver 100watts for an hour. its why airlines restrict batteries by wh (100wh) instead of mAh
mA is the current and it varies depending on voltage of the battery. for example a 1000 mAh battery at 5V is 5Wh of energy while 1000mAh battery at 10V is 10Wh of energy.
its the reason why you can compare phone's battery capacity in mAh because all phone batteries have the same voltage (usually) 4.2V
If I charge a device, do I need to match the electricity numbers on the charger with the device or the battery?
yes you need to look for the voltage and wattage. voltage too high/low can fry the device. wattage is important too for example if a laptop is consuming 100watts of power and you have a 60w charger plugged in, itll slowly drain the battery instead of charging it.
wattage is the product of current (measured in amps) multiplied by voltage (measured in volts),
wattage is power, energy expended over a period of time, 1 watt is 1 joule/sec
mAh (milliamperehours) and Wh (watthours) are a measure of the energy capacity of a battery, how much total juice a battery can hold when fully charged