Hello JanisDreiblathens,
This could very well be hardware related. For an issue with the lens on your iPhone camera, we'd recommend taking these related steps:
- Clean the lenses: Cleaning your iPhone - Apple Support
- Restart your iPhone - Apple Support
- Follow these steps to troubleshoot the camera issue: If the camera or flash on your iPhone, iPad, or iPod touch isn't working - Apple Support
Should you continue to have this issue, then it would be best to have the iPhone inspected by a Technician: iPhone Repair & Service - Apple Support
Select 'Service' here and search nearby for locations: Find Locations
Use this to get prepared for your visit: Get your iPhone, iPad, or iPod touch ready for service - Apple Support
A Technician would be able to provide you with their recommendations. Including, if it requires a repair and if so, what that cost may be to repair it.
Hoping this helps out, take care.