The only ways to prevent it are first and foremost not becoming a victim, Which means arming thyself or at the very least taking classes on self defense, in which case you're still "arming" yourself in a sense. The next but least reliable source of preventing and stopping crime or being a victim of a crime is to count on others including the police to save you.
Sadly you cannot count on either, the police response time is almost always going to be too late, and civilians generally are too busy filming your situation on their cellphone camera to give a shit. So we the wise people arm ourselves, not only with firearms, but pepper spray, knives and the knowledge that almost anything can be used as a weapon.
Here is a sad story that you've head a hundred times already, yet it keeps happening... I had a former coworker who worked a second job as a pizza delivery guy, he got robbed the same exact way. Delivery at a house that turned out to be vacant, Luckily he was not shot or harmed otherwise. This young lady was not so lucky.
I've seen some pizza companies double up people for night time deliveries, especially to crappy neighborhoods. I've seem to remember a story a while back of a pizza delivery guy who was fired for defending himself with a firearm. You know what I always say?
Better to be judged by twelve than carried by six!