How did I learn to cope? How did I learn to cope with being bullied, having been bullied or how to deal with such situations as a bystander? Maybe I'll just answer all of them.
I'm not bullied any more, and can effectively defend myself now.
I'm not sure I learned to cope with having been bullied, or if I ever will. It is an invisible scar that shows itself in counterintuitive, suprising, and sometimes creeping ways. I don't know how to generically deal with it. Self-chosen social isolation is an intuitive way to deal with it, though I don't want it for myself.
I'm quite stubborn and don't easily give in to social pressure, so that might have made it easier for me. I'm also curious and want to try out new things, so I try to benignly ignore social conventions to see what happens and learn from that. This has made me in some aspects very social, because consciously refusing or experimenting with implicit social norms can lead to behaviour that is not often seen. For example, a coffeehouse is not for people to drink coffee even though that is the implicit convention; It is much easier, cheaper and more comfortable to drink a coffee at home. People go to coffeehouses for social interaction. I realize that and act accordingly. I just go to people I'd like to talk with and ask them if they feel like chatting. My experience with that has been astonishingly positive, so I assume my understanding is correct. But doing that is not easy for everyone because the fear of rejection is so strong, even when the decision to try it was made very consciously. Humans are masters at unconscious interpretation of behaviour and social situations. We know when and who to talk to about what because we dread social punishment so much. This is just one example, and I don't understand psychology very well including my own, but hey, at least I can share my experience. :)
I learnt how to act as a bystander from many experiences. There is a good german explanatory video that gives an introduction[0]. Key to stop bullying is to understand that passive bystanders make the situation for the victim significantly more painful. Those around can easily and effectively stop most bullying. If you are bullied it can help to call out passive bystanders directly and individually.
Deterrence absolutely works, and it is not necessary to bully others to build up deterrence. For instance adults can easily seem like demigods for children; unsurmountably strong, more knowledgeable and experienced, larger and heavier, with deeper lower voice and unmatchable social standing. This is why children don't often pick on adults.
[0] https://www1.wdr.de/mediathek/video/sendungen/quarks-und-co/...