From virtue wealth is derived and from wealth enjoyment. Vairāgya (non-attachment) is the outcome of enjoyment. That is to say, when one fully enjoys the pleasures by means of wealth acquired by virtuous means one comes to the stage of Vairāgya (Detached State).
विपरीतार्थभोगेन राग एव प्रजायते । धर्मश्च द्विविधः प्रोक्तो द्र व्यदेहद्वयेन च ५२ ।
If the enjoyment is through the wealth acquired by other means, the result is the increase of passion alone. Dharma is twofold: one through the sacrificial offering and the other through the body by performing ceremonial ablutions in a sacred river etc. One can earn wealth through virtue and divine form through penance.
By physical practices like bathing in sacred places (tirtha-snan), one gains material wealth, while through tapas (austerities), one attains divine form or spiritual transformation.
निष्कामः शुद्धिमाप्नोति शुद्ध्या ज्ञानं न संशयः । कृतादौ हि तपःश्लोघ्यं द्र व्यधर्मः कलौ युगे ५४ ।
A person freed from desire gains purity and by purity he acquires knowledge. There is no doubt about it. In the ages of Kṛtā, Tretā and Dvāpara penance was recommended for attaining Dharma; but in the age of Kali it is the sacrificial offering that secures Dharma for us.
कृतेध्यानाज्ज्ञानसिद्धिस्त्रेतायां तपसा तथा । द्वापरे यजनाज्ज्ञानं प्रतिमापूजया कलौ ५५ ।
In the Kṛta age knowledge was acquired through meditation; in the Tretā through penance; in the Dvāpara through sacrifice and now in the Kali age it is through the worship of idols.