My own experience of replacing a smartphone battery
Continuous charge cycles of a phone battery will deplete is useful life.
The more you charge and discharge a battery, eventually the battery will not be able to hold as much charge as before.
Modern smartphones now have the battery inside the case and is designed to be “non-removable”.
However depending on the model of the phone, these so called non-removable batteries can be swapped quite easily with simple tools.
An app I have found will measure the amount of charge going into your phone's battery and use it to estimate the battery's health.
The app is called Accubattery - https://play.google.com/store/apps/details?id=com.digibites.accubattery&hl=en_GB
If the app shows that your phone's battery is not holding as much charge, you may need to replace the battery to extend the life of the phone.
The battery itself and the phone's logic board are 2 separate components. I read that it's not actually possible to literally measure the amount of remaining charge in a battery, so you can only make calculated guesses based on measurements you can take and from historic data collected on the performance.
There would also appear be 2 systems working - the phone's operating system and the circuit on the battery itself.
I changed the battery in my OnePlus 3T. The new battery itself shown around 40% charge although this was to the phone's calibration at that particular time so the true amount was unclear.
As it was my first battery change, i did a small charge just to test the battery itself did charge which it did.
I then ran the battery down (playing YouTube and turning screen brightness to max and turning off battery saver).
Phone would indicate that it had 1% left, but would still continue to work for around 50 mins streaming YouTube.
Eventually it did run out of power and the phone shut down safely.
I powered the phone back on again but reconnected the charger while phone was booting. In retrospect this may not have been the best thing to do as it may still not calibrate the battery properly.
Phone was eventually fully charged but Accubattery said it only took 2455 mAh from 1 to 99%. Not entirely sure how accurate this is, but if these figures are correct, the phone is not taking full charge.