If you are young, you are correct. If you are older and physically not up to it, then some sort of a weapon and learn how to use it effectively.
The training is necessary. Most people don't seem to have any innate response to an ambush attack. The key is to respond immediately and effectively with directed violence. To do so requires recognizing an attack, and having the capacity to act quickly. If the attacker is naive and impulse-driven, a quick response may turn the tables to the degree the attacker flees. Even an attacker with training may be deterred by an unexpected violent response.
Of course, a victim with no situational awareness may never recover sufficiently to respond effectively. An attacker trained to use an attack to gain control over a person (e.g. police training) will be hard to deter and will persevere until achieving the objective. Back in 80s I was attacked by a security guard who thought I was a shoplifting suspect. I saw him coming and assumed he was after someone behind me, so I dodged and he ran into the wall. When I helped him up, he tried to put me in a hold but he was too stunned to complete it and fell down again. I called for help and we sorted it out, but I could see he was still fixated on me. He kept maneuvering to prevent my escape until we reviewed the security cam footage and he realized his target had already fled the store.