Any electric battery is a closed container filled with electrolyte, which occupies a certain space in a closed loop. When the battery is charged, the electrolyte is saturated with free electrical particles, which are the carriers of electricity. As the battery is connected to the circuit, the charge carriers begin to transfer the charge in a closed loop to all connected electricity consumers.
The quantitative and qualitative indicators of the electric current and voltage produced by the battery are affected by the charge density of electrical particles per unit of the bulb capacity. After the consumption of electrical energy from the battery for its intended purpose, the density of charged particles gradually decreases. After the density of charged particles becomes insufficient to obtain the required current and voltage for any equipment, the batteries are considered unusable.
If you squeeze the battery case in any way possible, as a result of which the bulb with electrolyte deforms and significantly decreases, the remaining charge carriers in the battery will increase their density per unit volume. This will increase the potential difference at the battery terminals, as a result of which the voltage and power will be sufficient for the further operation of a device. But this is a temporary measure, it will not always work to increase the life by means of blows or deformations, and if the integrity of the flask is violated, the battery very quickly fails.
Without going into the possession of electrochemistry, in the language of physics, a battery has a certain reserve of energy density - electrochemical energy per unit volume. The total energy decreases over time. Nothing to do about. That is life. Experienced people (people with extensive experience of life in the USSR) advise you to carefully squeeze the battery from the sides without damaging the case. Then the volume of the battery will decrease and, at a given total energy, the energy density will increase and it can be temporarily continued to be used. This should not be done repeatedly due to the risk of destroying the internal structure of the battery. My advice is to buy a new one.