The method that a camera uses to assign ISO values within a given range can vary between camera models and manufacturers. However, in general, the camera will use a combination of factors such as available light, shutter speed, aperture, and exposure compensation to determine the optimal ISO value.
When shooting in auto mode, the camera will typically start with a lower ISO value and gradually increase it as the available light decreases, while still trying to maintain a proper exposure. This ensures that the image remains as noise-free as possible while still capturing enough light to properly expose the scene.