Hello Ana_bbb,
Thanks for posting in the Apple Support Communities.
It sounds like your iPhone battery may need to be inspected, so let's see if that could be related. Take a look at the steps below for assistance with reviewing your iPhone battery health, and you can learn more about your battery and performance here: iPhone Battery and Performance - Apple Support
Battery Health
For iPhone 6 and later, iOS 11.3 and later add new features to show battery health and recommend if you need to replace the battery. You can find these in Settings > Battery > Battery Health (with iOS 16.1 or later, find these in Settings > Battery > Battery Health & Charging).
Additionally, you can see if the performance management feature, which dynamically manages maximum performance to prevent unexpected shutdowns, is on, and you can choose to turn it off. This feature is enabled only after an unexpected shutdown first occurs on a device with a battery that has diminished ability to deliver maximum instantaneous power. This feature applies to iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone SE (1st generation), iPhone 7, and iPhone 7 Plus. Starting with iOS 12.1, iPhone 8, iPhone 8 Plus, and iPhone X include this feature; iPhone XS, iPhone XS Max, and iPhone XR include this feature starting with iOS 13.1. Learn about performance management on iPhone 11 and later. The effects of performance management on these newer models may be less noticeable due to their more advanced hardware and software design.
Let us know if you see that the iPhone battery health is low or not. This will provide additional insight into what could be contributing to this occurring. In addition, review the battery usage details to see what the reported battery life looks like.
Take care!