Krienen and team found tested these theories. They found that when people answered questions about friends, whether or not they felt they were similar to their friends, the medial prefrontal cortex (MPFC) was active. The MPFC is the part of the brain that is active in perceiving value and regulating social behavior. When people thought about others that they don’t know, but have common interests with (are similar to), the MPFC was not active.

https://www.blog.theteamw.com/2011/03/23/100-things-you-should-know-about-people-88-your-brain-has-a-special-response-to-people-you-know/