It is surely not an iOS issue. It could be either charging or battery issue.
Protect & Prolong life of your iPhone's Battery:
- About the battery usage on your iPhone, iPad, and iPod touch ...
- Batteries - Maximising Performance - Apple (IN)
- iPhone Battery and Performance
Try some of these options too.
- Avoid Screen Mirroring
- Put on Low Power Mode
- Put Auto Lock On (1 min):- with low power mode it will be 30 Sec
- Put Auto Answer Off
- Disable Push notifications for apps you do not use often
- Keep your iPhone Face down to prevent notifications to light up screen
- Enable Auto Brightness:- Settings > General > Accessibility > Display Accommodations > Auto-Brightness [Enable]
- Manually lower brightness from Control Center
- If you Want to watch continuous Video. Stream it on TV or a Monitor
- Don't force close apps; Apps which are not on frontend screen are paused by the system to save energy. Apps require more energy to re-launch. Apps which are open in the background use large memory is a myth and quitting them is counterproductive
- Location services to be allowed only while using the app
- Set your iPhone to fetch email and calendar data from internet less frequently
- Turning off Background App Refresh
- Charge before it drops below 20-30%
- Try connecting to trusted Wifi where ever available in stead of Cellular
- Enable Airplane mode in areas with bad cellular and wifi coverage. Your phone keeps trying for reconnection with the missing / weak network. This uses lot of energy
- Switch off Wifi & Bluetooth while in Roaming or Not in Range
- Enable "Wifi Assist" : Settings > Cellular or Settings > Mobile Data > Wi-Fi Assist [Enable]
- Periodically Check your Battery Health (Settings > Battery > Battery Health)
These alerts can appear for a few reasons: Your iOS device might have a dirty or damaged charging port, your charging accessory is defective, damaged, or non Apple-certified, or your USB charger isn't designed to charge devices. Follow these steps: Remove any debris from the charging port on the bottom of your device.
If your iPhone or iPod touch won't charge - Apple Support