There are two ways to use flash. Always keep that in mind, because you decide which one it is for any given shot.
2. Flash as the only light source. You would do this in a studio setting.
If you want this, select an aperture-shutter-ISO combination that makes the available light go dark. Like 1/125th second, f/8, 200 ISO:
2: Flash mixed with available light. You would do this at a party.
If you want this, select an aperture-shutter-ISO combination that makes the available light show up too – maybe two stops below normal. Like 400 ISO, 1/40th sec, f/4 (the“Willems 444 rule”):
Simple, once you realize this: the flash is separate from the ambient light. In TTL mode, flash is metered separately.