Your iPhone is not done for, however, may be in need of a battery replacement OR you may not have enough free storage space on your iPhone.
You may have a poor battery condition which cannot provide sufficient power for peak performance. What is the Battery Health of your iPhone? Open Settings ➔ Battery ➔ Battery Health and let us know which percentage you see for Maximum Capacity. Also note what is written under Peak Performance. If your battery's Maximum Capacity shows a value of 80% or less, then it has gone through its lifecycle and therefore should be replaced, according to Apple.
How much free space is available on your iPhone? To check, open Settings ➡️ General ➡️ About ➡️ Available. Here you should see the available free space. You should maintain at least 10GB+ to keep your iPhone running efficiently.
Axel F.