Remember that the best thing you can do if you’re being harassed is to report them immediately by right clicking their name and selecting report. Do not respond to any potential harassment, just report and move on with your day. Reporting them will automatically ignore them on your character for that session. Manually putting them on ignore is recommended as well.
If they circumvent the ignore, you can open a ticket to report them for ongoing harassment.
This blue post from a couple years ago includes a lot of good information on the topic. It’s worth a read if you’re unaware of how to handle this in the game. Cheers!
https://us.forums.blizzard.com/en/wow/t/spotlight-on-harassment/10309