I should mention that this book is only about ambient light, daylight, incandescent, etc, and it does NOT mention flash. Flash is sort of a different world. The book does explain about basics and purpose of f/stops and shutter speed and ISO however, as introduction for a beginner. It is very popular, in that regard. Odds are good it may be in your local library. But it is not about flash. The same author has one called Understanding Flash, which I would NOT recommend, some other one would be better.
Without flash, in ambient low light situations, camera mode S will likely simply open the aperture wide open, your f/1.8.
Or camera A mode then will likely use a very slow shutter speed.
It meters the ambient to decide this (however, you are using flash).
Higher ISO is the only solution to increase those - speaking of ambient light.
But flash is a very different story. Flash is NOT a low light situation, more likely you have about all the light you can use. (Speedlights in umbrellas at f/11 may need the lights to be fairly close). Flash is a different world, with different rules. Easy, but different.
Flash is NOT affected by shutter speed (a fundamental). Regardless if you use 1/2 second or 1/200 second, your flash duration is even faster. The shutter just has to be open when the flash fires. So... we really would never consider camera S mode with flash, certainly not indoors - since the flash does not care about shutter speed (we still cannot exceed Maximum sync speed however, about 1/200 second).
The shutter speed might read low in dim places, but in camera A or P modes, when you turn the flash on, the shutter speed will jump up to 1/60 second. I don't know your camera model, there can be minor ifs and buts and a couple of options, but generally 1/60 second is Minimum Shutter Speed with flash (you do not need it slower if you are using flash, and are ignoring the dim ambient).
In a studio situation (like yours), it is normal to use camera M mode with flash, so we can set any shutter speed, and normally 1/200 second is used (Maximum Sync Speed), to keep out the orange incandescent room light. The TTL flash is still fully automatic flash exposure in any camera mode. The camera mode only sets up for the ambient light, but we couldn't care less about proper ambient exposure (in dim indoor settings).
And, Flash Compensation is how we control what automatic TTL flash does. Add a bit of -EV flash compensation to reduce overexposure, or add a bit of +EV flash compensation to increase flash to fix underexposure.
These basics so far are about all you have to know (but there is more that we can use to good benefit).
So, with flash (and camera A or M modes), you can probably set f/8 or f/11 to increase depth of field. Maybe the shutter speed reads extremely slow then in the dim ambient, but so what, we are not using ambient. When you turn on the flash in camera A mode, it jumps to 1/60 second, and the flash is even much faster than that (called a speedlight). Or in camera M mode, it is good to set 1/200 second (to keep out any orange ambient). Again, camera M mode is about the ambient, about which you are not concerned now. You are using flash instead. If the flash is TTL mode, it is still fully automatic flash exposure in any camera mode. Good stuff to know.
But by choosing camera S mode, you kept that from happening. You set 1/200, and S mode aperture went to f/1.8 (due to the low ambient light, which you were not even using), and then the flash had to use that f/1.8. You should have set the aperture you needed, maybe f/8. And set a low ISO for flash, maybe ISO 100 to 400, but you do NOT need ISO 800 or higher with flash).
Assuming DX camera and 35 mm lens at maybe 6 feet, at f/1.8, you only had maybe 3 questionable inches depth of field in front of and behind point of focus. And lenses are never very sharp when wide open, even stopping down one or two stops works wonders. But f/11 would increase that to maybe 18 inches front and back, still not much at the close range (we need to plan it just a bit, to center it on our scene), but lots more than f/1.8 can do.
So, this flash use (at least the pumpkins greater range) requires:
Camera mode A or M
Lower ISO
Maybe f/8 or f/11
One last point, about camera M mode in similar studio situations.
If you set M mode so you can set 1/200 second, and f/8, and you take this same picture, but with all the flashes turned OFF, you get a very black picture (solid black nothingness). Which is the goal of camera M mode - the 1/200 second kept out any traces of the orange incandescent room lights. But turn the flash on, and TTL will meter it and set its power level and you get your picture then. And the flash is even faster duration, to stop all motion easily. Or of course, you can set manual flash levels too, but the illumination is flash, not the ambient (in studio settings). So - don't meter the ambient with camera S mode.
And I should clarify (correct) a previous statement. Focusing about 1/3 of the way into the depth field is good for greater distances, like landscapes. But for close portraits, and macro esp, about 1/2 way is the right number.