If purusha, prakriti and parmeshwar are eternal, did god not create them?
He did not create Jivatmas or Prakriti (material elements) because they are both eternal, but he still created the universe, all its heavens, hells, underworlds, lifeforms, etc. by modifying Prakriti, and he put Jivatmas in those bodies based on their karma.
According to Vedanta, ...
Why has God created material system/universe?
According to the Brahma Sutras, it is for sport; a pastime.
33. But (it is) mere sport, as in ordinary life.
And Ramanujacharya's commentary for that sutra:
The motive which prompts Brahman--all whose wishes are fulfilled and who is perfect in himself--to the creation of a world comprising all kinds of ...