I think we’ve all been through this at some point in time of iPhone ownership.
Try going into battery in the settings and battery health. Check the percentage left and also check that peak performance capability is still supported.
If the percentage is slow what that basically means is that when your phone says it’s charged to 100% it’s actually only charge to whatever percentage is remaining of the original capacity. That means that as the indicator ticks down it’s ticking down the percentage of the charge capability left in the battery rather than the total capacity of an as new battery.
If the peak performance isn’t still supported by your battery then you’re definitely looking at a replacement battery.
The other thing to consider is software such as a rogue app. Might be worth doing a wipe and fresh install of your phone. Make a backup and restore that to your phone. See if it’s any better. If not then try another fresh install but this time set up as new (that’s such a pain I know) and see if that makes any difference.
Certainly in the iOS 12 beta you get a lot of information on the battery and what’s happening with it but equally in iOS 11 the battery section was much improved.
Also you can try Apple support online. As long as you’re connected to WiFi they can run the diagnostic tests remotely and inform you if you need a replacement battery or not.