The shutter speed is what controls how much light enters.

You use a low shutter speed for more light, you get an outcome like this, it takes a lot longer to capture the image and you need to put it on a tripod.

Fast shutter speed can capture moments precisely, it shoots really fast, you don’t need a lot of light.