Bob Timmons wrote:
Not sure how the phone could be "brand new" if it is clear that repairs were made on the phone before you purchased it.
The only way that the message will go away is if the correct part is installed on the phone. We will repeat.....the only way that the message will go away is if the correct part is installed on the phone.
The OP mentions buying it brand new, but not that it is brand new. I bought my iPhone 7 brand new in 2017, but I certainly wouldn't consider it brand new now. I believe the rationale for mentioning that was to hint that the OP knows the full provenance - that the camera is the original.
There have been plenty of reports of this warning coming up with completely original iPhones. I'm sure that an authorized tech can verify that it's all original and have reset the system to remove the warning.