Did you use TWRP to make a backup before you erased everything? If so, where did you store it? And if you don't mind my asking, what were you trying to do and what did you expect "erase all partitions" to do?
The curious thing is that the last couple of images look like a stock recovery, not TWRP, which implies that TWRP was not actually installed on your phone. So how exactly did you run TWRP? Did you use "fastboot boot" to boot it with a TWRP image or something? If so then you can also do the same thing again and load a custom ROM using TWRP. But as many phones don't support "fastboot boot" I don't know whether this is what you did (which is why I'm asking).
Anyway if you didn't use TWRP to take a backup before wiping everything, you don't have TWRP installed on the device, and your device doesn't support "fastboot boot" then you have no alternative but to reflash it with stock motorola firmware. As I've never owned a Moto smartphone I'm not familiar with where you would find this or what you would use to flash it, but hopefully others will be.
Don't worry about "viruses". The stock software won't contain malware, and there actually aren't any Android viruses (there is malware, but not the type that is correctly called a "virus". Android malware is invariably of the "trojan" type, i.e. hidden inside an app that the user installs on their device). So if you are careful about what you install and don't let others have access to your phone you shouldn't have to worry about malware.