Need help to understand this kind of connection

I wanna know about this kind of experience...
Sometimes we develop a strong connection with someone we interact, while sometimes we dont....
Anyone, have you ever experienced a deep connection with opposite gender, it is not se*xual or intimate but a different kind of connection we feel, i think it is difficult to explain, if anyone has experienced it he/she will understand it, so i wanna know is it happens because of our own mental health (anxiety & depression) and is just a delusion of mind and not a strong connection..?

@sunnyMoon4015
We can connect to someone for many many reasons....
I look at each person I meet and deal with often this connection comes at a time when we are ready to grow as a person.... maybe this person you meet gives you guidance/ or insight or the key to the next chapter in your life....
There are many real and strong connections with people regardless of gender. I feel too many assume people cannot just have friendly bonds with a person with out some sort of underlying issue.... do not overthink it ....