Generally, these things should be invited and you set clear boundaries - like, “don’t bother me at work”. If you didn’t invite it and this is causing you issues, you have to get rid of it, then set up proper protections so worthless randoms don’t just attack you again. .
We call this banishing or exorcism.
It’s a common problem so we have a bunch of free tutorials with ways to get rid of lesser entities and harmful time wasters.