Usually, the camera (running on the Media Tek app) on the Redmi Note 4 works a treat

Yesterday morning (in the dark) the flash would fire, but seemed to be out-of-sync with the shutter, giving dark pics
I couldn't be bothered searching through settings, which I had not changed, so a quick re-boot had to do. Another try
and "No effect!", so I used an LED torch for light...

Later I installed another camera app besides the native one. It's called Open Camera (for Android). I tried it, and the
flash worked properly. Later I tried the native app. It worked properly too

So, moral: If an app is not working properly, install a rival app