To simplify I'll pick a grayscale image so with 8bits you would only have 0-255 as pixel values for the intensity.
With 12 bits you'll have 4096, and so forth.
What cellphone HDR usually does is take the image at a high exposure and a low exposure and combine the result. (Also the sensors inside the cellphone are also more than 8bit)
Even if you take a 12 bit photo if it's overexposed you can't do much. All you get is more play but it doesn't solve the fundamental problem of too much light hitting the sensor, or vice versa if the image is underexposed.
Now there are more advanced camera sensors that let you set the exposure time (or usually the ISO (which just translates to gain) at specific horizontal points of the sensor so that you can get even better images in one frame.