Hi,
The factors involved are the full well capacity (FWC) , that is how many electron charges the pixel can hold and the readout noise of the sensor. DR is simply FWC divided with the "readout noise" of the sensor. This is a tiny bit oversimplified.
It could be argued that FWC should be utilized fully at exposure, exposing non specular highlights just below FWC, this is called expose to the right and maximises DR.
Highlights can never go beyond FWC, but you can protect highlights by underexposing the image.
The other end is dark detail. Here noise sets the limit. Engineering DR tells how far the noise floor is from the ceiling defined by FWC.
Engineering DR is plenty on modern sensors, especially with CMOS sensors using column converters doing conversions in parallell. But, you cannot show like 13 EV of DR on a screen especially not in surround light. So, if we want to utilize the DR of a modern camera, we need to map tones.
The images below show a white text over a gradient going from Lab(100, 0,0) to Lab(80, 0, 0), printed on paper. The images were shot on a P45+ (2007 year's CCD) and a Sony A7rII (2015 year's CMOS)

. The text begins with Lorem ipsum and the "m" in Lorem is the first discernible character in the original print.
Getting a scene with a full dynamic range utilizing the sensor is no easy task. In the example below, a tabletop setup was made, illuminated by a single flash with a grid to reduce light spread. The image was split into a highlight/shadow part. An additional flash at minimum power was bounced trough a door to get some fill light. This scene had a luminance range of around 14 stop.
The highlight parts were pretty much similar:

Brightening the shadows was not easy, as I run into the 5EV exposure limitation of Lightroom, combined with the built in exposure bias of LR. So, I resorted to RawTherapee to show shadow detail, where I could adjust exposure at will:

This image shows that the A7rII handles the shadow detail well. The P45+ image is noisy. With the A900, that is the same era as the P45+, the image is blotchy. This is probably in part due to the A900 using a 12 bit file format, 14 bits are needed to handle 14EV of dynamic range.
Some examples are shown in this discussion:
https://www.dpreview.com/forums/thread/4083662Best regards
Erik