Every lock has a key. The lock is the question, the key is the answer. If detachment were a lock, then what would be its key? If we had a question, how do we feel detached, then what would be the answer to that? Let's try and investigate.
The opposite of detachment is attachment. One feels attached to our relationships, social status, wealth, power, and fame. We feel as if all this belongs to us. We feel proud of this ownership. This pride is nothing but our ego. Our ego cries to create our identity. We become an individual now. We are no more egoless. Our unique individuality comes with it the baggage of ego. Ego is the cause of attachment. When you drop ego, you become detached. This is the key to detachment.