The Torah or Deuteronomy book says not to associate with people of other nations in a deep way, how do you view this?

I know that when I entertain certain types of people, even mentally, it's like poison in my soul, I just get bombarded with all their vanity and mental sickness from engaging these people in dialogue or thought. That is one of the reasons I ghosted certain people who tried to get close to me, it was like their vanity was rubbing off on me and making me vain too. So it might be too my advantage that I was a social outsider in my youth cause these people appear to be poisonous to my soul. I think a lot of guys hate vanity just as much as I do, cause they choose people who aren't so popular as partners when they have the looks and the personality to get very popular people.

The Torah or Deuteronomy book says not to associate with people of other nations in a deep way, how do you view this?
Post Opinion