Most of the time, you can use the ignore or block feature to cut off contact. You can also report the person on the platform you're using, which can lead to their account being blocked. And don't hesitate to tell a trusted adult if it continues.