Two things. First, if he keeps coming back and harassing you, please make sure people know about it. I'm not talking about reporting him to the police (it depends what he's doing), but make sure your friends and family know in case things escalate with him and you need support from them.
Second, you can move on from this, but it takes time, and I'd also recommend counselling. It can genuinely be a significant help with things like this. But whether you do it or not, as time moves on and you grow up, there's every chance that you will be able to put these experiences into context. It doesn't mean that they suddenly won't be bad memories, but there will be some positives from them, such as being able to spot signs of toxic behaviour in future potential friends and partners. You'll also hopefully have more positive relationships in future, and when you do it will be much easier to consign this guy as a footnote in your past, rather than something that is affecting you. You can't fully forget him, but you shouldn't want to, because this is experience that you can use going forwards. But it will get easier to cope with, and will become less important the older you get.