Achieving all four aspects of Purusharth

Both Artha (wealth and material comforts) and Kama (desire or passion) arise in life from time to time according to one’s needs. Fulfilling those needs to sustain one’s life, yet not getting entangled in too much greed or lust is the responsibility of Dharma (righteous action) and Moksha (liberation from suffering).
The main goals of our life are Dharma and Moksha. In the course of our life, from time to time, we have to engage ourselves in the pursuit of Artha and Kama. Enjoying them but at the same time not getting caught up in it. This is why we should engage in those action that are in alignment with our Dharma, and refrain from those actions that go against Dharma. The same goes for Artha also.
Life cannot run without any one of the four aspects of Purusharth.
In the course of life, you must have Moksha as your supreme aim; adhere to and uphold Dharma at all times, and you will see that your pursuits for both Artha and Kaama will also give good results in due course of time.