When should I use/not use '-w' for fastboot flashing? When should I use/not use '-w' for fastboot flashing?

Say I were to be manually flashing each img in the zip of a factory image.

Why one way or another? Do certain .img's need to be erased first?

I recently had a misflash where my internal storage was reduced from 64gb to 32gb and I am wondering if it could have been avoided. I resolved my particular problem by using Format Data in TWRP.
You should wipe the data once, when you start.  This may not be necessary if you are (for example) only flashing a recovery, flashing a very similar ROM, etc.

You shouldn't need to erase images/partitions before flashing over them.