I would try testing the cameras individually via the Hardware Test Menu (CIT) available on Xiaomi phones. Here's a guide you can [link|https://xiaomiui.net/hidden-hardware-diagnostic-menu-in-android-6787/|follow|new_window=true]. This diagnostics tool will allow you to isolate if it's a single camera, the flash, or the whole assembly (which I'm not familiar with a teardown of the device).
Once you isolate the hardware components, you can ensure everything is plugged in and seated correctly. Additionally, check for any corrosion or signs of a short. If everything looks clean, I would replace the problematic part(s) and see if you can resolve the issue. Otherwise, you may be looking at a motherboard failure.