One thing that is important to realize is that digital and film photography are utterly different with respect to dealing with sensitivity, and on top of that, different sensor types are different as well.
For negative film exposure, your film sensitivity is implemented by the size of individual grains. While the grains become quite more visible with underexposure (since they overlap less), the film choice fundamentally determines both spatial resolution and the ability to represent different luminosity.
Also film is really, really, inert on its own. If no light falls on it, you can "expose" it for months (namely just keep it in-camera or in-cartridge) without change before handing it off to development
Digital sensors are quite different. The size of photocells is fixed (though you might combine severals in post-processing to reduce noise somewhat) and the concept of "charge wells" means that the resulting voltage is pretty much proportional to the arriving light energy. Sensors these days are either considerably smaller than typical film sensor and/or quite more sensitive. A major factor regarding the sensitivity particularly with smaller sensor or high resolution sensor is photon counts: the number of photons registering for each pixel can be so small that the statistical variation of their numbers is a significant source of image noise: photon noise.
Then there is analog amplification and subsequent quantization.
ISO on digital sensors will be used for determining "correct exposure" and for influencing the analog amplification (a process audio engineers know as "gain staging" before quantization).
To what degree? Some sensor types let whole ISO stops influence the analog amplification while fractional ISO stops just affect metering and processing (so ISO160, ISO200, ISO250 might all be using the same analog/quantization setup but meter with +1/3EV, 0EV, and -1/3EV of correction and then compensate the result digitally).
There are also "ISO invariant" sensors like Sony Exmor that don't change anything in the analog and quantization paths: an ISO200 image underexposed by 4 stops contains the same data as a properly exposed ISO3200 image on those sensors, it is just interpreted differently. It also means that it's almost impossible to blow highlights at higher ISO values with those sensors at least in the raw files.
While not all sensors have complete ISO invariance, larger sensors with potentially larger photosites often still have good digitisation reserves and consequently resilience against blown highlights so that overexposed higher ISO images tend to be quite comparable in quality (at least when working with raw files) to "properly" exposed lower ISO images, so dialing in positive exposure compensation or flash compensation can yield better shadow resolution.
So "expose to the right" will have quite different reserves depending on the sensor used and the ISO setting, with larger sensors and larger ISO values often having larger reserves for getting more light into the camera as "average" metering would.