Hello boloney,
Thanks for participating in the Apple Support Communities.
Since you're seeing this occur with the Camera app and overall iPhone performance, this could be related to a number of different scenarios. We'd recommend working through the following resource to see if you're able to determine what's causing this: About iOS or iPadOS performance on your iPhone, iPad, or iPod touch - Apple Support
Look at your battery health
All rechargeable batteries are consumable components that become less effective as they chemically age. Over time, the rechargeable batteries in all iPhone models will diminish in their capacity and peak performance and will eventually need to be replaced. iOS can show show battery health and recommend if an iPhone battery needs to be replaced. Go to Settings > Battery and tap Battery Health. Battery Health is available only on iPhone.
Check your iPhone battery.
Let us know what you find through each of the suggestions in the resource.
Have a great day!