The anonymity is the core problem. A bully can act without attaching a real identity to it, and the victim is often left wanting two contradictory things at once: for the harassment to end, and to keep using the site where their friends are.
Most platforms offer a block function, and using it cuts the contact immediately. Nearly all also have a report-user option, and enough reports can get an account removed entirely.
Saving screenshots before blocking is worth doing too — evidence matters if the situation needs to be escalated to a school, employer or the platform's safety team.