Bhagavad Gita

ಅವ್ಯಕ್ತಾದೀನಿ ಭೂತಾನಿ ವ್ಯಕ್ತಮಧ್ಯಾನಿ ಭಾರತ ।
ಅವ್ಯಕ್ತನಿಧನಾನ್ಯೇವ ತತ್ರ ಕಾ ಪರಿದೇವನಾ ॥೨೮॥
avyaktādīni bhūtāni vyaktamadhyāni bhārata |
avyaktanidhanānyeva tatra kā paridevanā ||28||

Gist of the sloka:
O descendant of the Bharatha dynasty, we do not know the roots of the living nor its highest point. We only know its middle. Why then lament?
The core of Arjuna’s grief was that he might have to kill his senior relatives. It was his attachment which caused the grief. Lord is trying to address this doubt of Arjuna.
Our relationship starts with the birth of the relative. We have no idea who that soul was before the birth and we have no clue after they leave the body. The attachment is therefore with the body and not necessarily with the soul.
The verse mentions this fact as a tree. We are not aware of their source before birth [root] and neither do we know the top.
When this is the reality, why then lament for the short attachment we might have with the gross body which is destined to destroy?
It does not mean than when we both are residents in different gross bodies, we should not show any love and affection. Rather it is only a caution to ensure we are not excessively attached the body/relationships which might prevent us from elevating ourselves with the knowledge of the nature of soul.
Simple thing being when the birth happens and when death happens, remember the Lord gave the gross body and took it away. Maintain equanimity at all times.