Apparently today is International Bystander Awareness Day so here's an old guest blog from a bystander who intervened. I always aspire to be braver than I am in these situations:
https://www.girlonthenet.com/blog/intervening-in-harassment/

@girlonthenet this mirrors an incident of harassment on public transport I intervened in. Xenophobia in that case, but similarly I said something kinda confrontational to the perpetrator and then dialed it back, and later regretted the dialing back, but when all's said and done... I said something. I halted the harassment.

Intervening in a situation will always feel awkward as fuck, and you will probably act awkwardly, but that discomfort should rightly belong to the perpetrator.

@Tattie really good point, yeah. And well done for intervening!