It’s fine for a person to tell another person that something they do triggers them (Trigger Communicating), as long as they are only informing them.
As part of that, they may even also let the other person know that they can’t, or don’t wish to interact with them because of it.
If we do choose to Trigger Communicate, it might sound something like this: “Hi, just to let you know that when you do/say that thing it triggers me, it makes me feel [insert as appropriate: e.g. uncomfortable/scared/unloved].
“Of course, it’s my responsibility, I just thought I’d make you aware that it was having this effect on me.”
Or you can use (your own) words to that effect, depending on what exactly you want to say.