To use ISO to get the perfect shot, you need to balance it with the other two elements of the exposure triangle: aperture and shutter speed. Aperture is the opening of the lens that controls how much light enters the camera, and shutter speed is the duration of time that the camera sensor is exposed to light. Together, they determine the depth of field and the motion blur of your image. You can use different combinations of aperture, shutter speed, and ISO to achieve the same exposure level, but with different effects on your image quality and style.
For example, if you are shooting in a low-light situation, such as indoors or at night, you can increase your ISO value to make your camera more sensitive to light, but this will also increase the noise in your image. To reduce the noise, you can lower your ISO value, but then you will need to either open your aperture to let in more light, or slow down your shutter speed to allow more time for light to reach the sensor. However, opening your aperture will also reduce your depth of field, making your background more blurry, and slowing down your shutter speed will also increase the risk of motion blur, especially if you are handholding your camera or your subject is moving. Therefore, you need to find the optimal combination of aperture, shutter speed, and ISO that suits your creative vision and the conditions of your scene.