'And here there is this verse: "To whatever object a man's own mind is attached, to that he goes strenuously together with his deed; and having obtained the end (the last results) of whatever deed he does here on earth, he returns again from that world (which is the temporary reward of his deed) to this world of action." 'So much for the man who desires. But as to the man who does not desire, who, not desiring, freed from desires, is satisfied in his desires, or desires the Self only, his vital spirits do not depart elsewhere,—being Brahman, he goes to Brahman.
In plain words: Yajnavalkya, the sage teaching King Janaka, says that a person goes after death to whatever their mind was attached to. When the reward of their deeds runs out, they come back to this world. But a person who has let go of desires, or wants only the Self, does not go anywhere else after death. Being Brahman, the one reality behind everything, they simply become one with Brahman.