If the camera app opens but shows black, check software first, then the camera.
1. Restart the phone.
2. Clear the camera app's cache in app settings.
3. Switch between front and back cameras. If one works, the other camera or its connection is the problem.
4. Try another camera app.
5. Remove any case or ring that might cover the lens.
6. Open the phone and reseat the camera connector, especially after a drop or repair.
7. Test with a known good camera module.
If all cameras are black even with good modules, the camera circuit on the board may be faulty.