You could have a 5000 mAh battery and still not have a days run.
Newer SoC's and Android versions have improved Battery and Power management, but batteries will still degrade over time (ie. years and charging habit). Also it varies how people use their devices, such as, phone usage/purpose, apps installed, background activity, screen brightness, running Bluetooth, 4G and Wifi etc. Another factor are poorly developed or Unstable (beta) apps.
While in some cases, it's unavoidable, the user can reduce battery usage to a certain extent. More tips can be found online.
Phone manufacturers have modes to increase battery life by lowering brightness, screen resolution or disabling sensors at scheduled times.
Apple iPhone have a Low Power mode, accessible directly from Control Center:
Use Low Power Mode to save battery life on your iPhone
As an Xperia owner, I can use Stamina mode:
Xperia XZ2 Battery Life & Processor– Official Website - Sony Mobile (Global UK English)
I can get over a days usage, with moderate use (including some mobile gaming) on the new Xperia, that I cannot achieve on my older Xperia tablet - even though it
had the bigger battery.