it was billions of nanites that could link up and fight as a single unit before the order is made for it to go into doomsday machine mode.
heat vision might be able to damage the nanites in robot mode, but if it breaks up into the cloud of nanites that can replicate by consumption, they're useless against it.
the only thing that could maybe stop the cloud of nanites is if flash went as fast as possible and collect/disable them 1 by 1 before they spread out too far. that's probable a one way trip to the speed force though, and he's most likely not going to think of something like that on the fly.