Usually the simplest fix is to block the person. Most platforms also let you report them.
If it is serious, take screenshots before you block, since you will want a record if you escalate it to a school, employer or the platform itself.