Deeper explanations:
If you use auto-iso with EC=0, then there is good chance that your photo is exposed correctly from start !
The camera uses the same settings with or without flash, so in low light it will use a high ISO, no surprise.
Besides, because it is already exposed correctly, your camera does not need to use flash (in fact usually it uses flash but very litlle..)
Suppose now you keep auto-iso but with EC=-1:
The exposure compensation only changes ambient light, not total lightness (which will be achieved thanks to the flash). What this means is that it will underbrighten by 1ev, again exactly as if you had no flash. And the flash will add the EV missing.
Globally you have an image at lower ISO which is cleaner thanks to the help of flash.
You can continue by decreasing EC which will add more flash at lower ISO (cleaner image).
It is perfectly feasible to use auto-iso, I have explained why at the end you had high ISO shots.
The best thing is certainly to use manual mode..
In manual you set all parameters (shutter speed, aperture, iso),and when all set, you see how it is exposed if you look at your metering scale (you can display it in the LCD or EVF). The EC dial has no effect in manual, but you see how you exposed thanks to this scale.
Imagine that you reach 0 in this scale, this generally means that it is correctly exposed and no (or little) flash will be used.
Anyway, just set the aperture, shutter speed (slower than the sync speed) and ISO you want, it will set the ambient light.
The flash will add the missing light (if it is powerfull enough) to expose correctly your subject.
Note that the total light remains unchanged so far... I explained the ambient light.
When you want to change the total light (on your subject), you use the flash compensation.
So if you see that your subject is too bright, use the flash compensation.
For the exposure compensation, you can ignore it like most people you are in manual, but I just wanted to explain what happened in your case.
I hope this is more clear.
You will find good information on this site, especially to explain flash/light:
https://www.cambridgeincolour.com/tutorials/camera-flash-2.htm