The first battery was developed slightly over 200 years ago; Electricity was poorly understood when Alessandro Volta created the voltaic pile from alternating disks of zinc and silver. A facsimile can be done at home, using coins and salt water, though the purity of the metal in the coins makes the experiment somewhat more difficult than it once was.
The first commercial batteries followed, mostly after Michael Faraday developed the laws of electrochemistry in the 1830’s. Some thirty years after that, the first rechargeable battery was developed, a lead-acid battery.
For context, the first battery preceded the light bulb by almost eighty years. It preceded the automobile by slightly more than eighty years.