The issue is not iOS related if it was so millions of users will have the same issue.
Kindly reach out to the Store/Individual/Agency from whom you acquired your iPhone. They would be best equipped to confirm whether the device has undergone servicing by an unauthorized service provider.
In case you recall not encountering this message at the time of purchase and it surfaced after an update, it's important to note that this message is visible specifically on iOS 15.2 and subsequent versions. It might be beneficial to inquire about any recent updates or changes made to the device's software configuration that could have triggered this notification.
Understanding the circumstances surrounding the appearance of this message could provide insights into any alterations in the device's service history or software updates that have brought about this notice.

Camera and service history
With iPhone 12 models and later using iOS 15.2 and later you can go to Settings > General > About to see the parts and service history of your iPhone and you can see if the camera has been replaced. If the repair was done using genuine Apple parts and processes, you will see "Genuine Apple Part" next to the Camera.


- You will see an Unknown Part
message if the camera installation is incomplete or if the camera: - Was replaced with a nongenuine camera
- Was already used or installed in another iPhone
- Isn't functioning as expected
This message doesn't affect your ability to use your iPhone or access your camera.
Learn more about iPhone parts and service history.