You’re missing something though: phone cell or battery capacity has been getting bigger, not smaller. The issue isn’t the batteries, it’s the other hardware and software needing more and more energy. Modern phones are much faster, have better screens at higher resolution, brightness, even refresh rate. All of this uses energy, even with modern technology being as awesome as it is. Qualcomm, TSMC, ARM, and Apple put quite a bit of work into making these things as efficient as they can be, but we keep demanding more and more from these devices. For many they replaced laptops after all.
It’s a bit like complaining that your new ultra high performance sports car is getting bad range, and complaining about the fuel tank or battery instead of the engine. The tank has only gotten bigger or at least stayed the same, but the engine has gotten hungrier and hungrier with each generation.
That’s a contributing factor to battery life remaining stagnant. Manufacturers use those advances while continuing to slim phones rather than making an actually flat brick that uses those advances to drastically increase battery life. Regardless of the energy needs of the phone manufacturers can use the difference in height between the back of a phone and the camera bump to include more battery capacity and it will increase both the daily and usable life of the phone.