If you have downloaded a third-party camera app and it works normally while the built-in iPhone Camera app does not, it does not necessarily mean that the camera hardware is functioning perfectly.
Unlike Apple's native Camera app, a third-party camera app may offer only basic photography features and use a more limited set of camera capabilities. Apple's Camera app, on the other hand, is designed to utilise the camera hardware and supported features available on your iPhone, depending on the selected mode and camera settings.
The fact that a third-party camera app works does not rule out a hardware issue. The third-party app may not access or utilise the specific camera module or feature that is causing the problem in Apple's Camera app. Consequently, the third-party app may continue to work even when a particular camera function is faulty.
Since you have already reset your iPhone, updated it to the latest version of iOS, and run the device diagnostics, which indicate a hardware issue, the problem should not be dismissed simply because a third-party camera app works.
In fact, the diagnostic results are an important indication that the issue could be hardware-related, despite the third-party app functioning normally. Further examination by Apple or an Apple Authorised Service Provider would help identify the faulty component and determine whether a repair is necessary.