When a phone that used to last all day suddenly doesn't, the cause is usually one or two apps rather than the battery itself.
Where to look
On an iPhone, open Settings, then Battery, and scroll to the list of apps. On Android it's under Settings, Battery, then Battery usage. Both show the last 24 hours and the last several days.
What the numbers mean
An app near the top is fine if you used it a lot. The warning sign is an app with high background activity that you barely opened. Restrict its background refresh first; if that doesn't help, check for an update or remove it.