Yes. Harassment is illegal as it targets the protected characteristics under the Equality Act. Meaning you are able to prosecute someone for harassment.