Hi All
The word "dunyaa" (دنيا) is the feminine form of the comparative أدنى (adnaa) from the verb دنا يدنو (danaa - yadnuu) which means "to be close or near". The word "dunyaa" then is the feminine form meaning "nearest" or "closest" and is almost always used as an adjective. Now, it is commonly used as an adjective for two nouns (1) الحياة الدنيا (al-Hayaat al-dunyaa) meaning "the life closest or nearest" to us as opposed to الحياة الأخرى (al-Hayaat al-'ukhraa) meaning "the final or afterlife", and (2) السماء الدنيا (al-samaa' al-dunyaa) meaning "the heaven closest or nearest" to us, such that it becomes the lowest heaven, and so on.
Now, it is also possible that "dunyaa" comes from the root "دَنِيَ - يَدْنَى" "daniya - yadnaa" which means "to be low, become base" and so on. Based on this root, "al-Hayaat al-dunyaa" is socalled because it is less, base and low compared to the everlasting afterlife from a religious perspective.
So, in this sense "al-dunyaa" refers to this life or this world, as opposed to the afterlife or next world.
The word العالَم (world) on the other hand, refers to the world in the sense of the universe or cosmos. So you find the very common Quranic verse "رب العالمين" (Lord and Cherisher of the worlds), meaning everything that exists in the universe including the universe. So, in my view, "al-dunyaa" means "the world" more in the sense of "this world" or "this life", and used often in a negative sense esp. when juxtaposed with the afterlife.
ps. Other words used for the world or universe or creation are: الكون (al-kawn) , الخلق (al-khalq) , and المخلوقات (al-makhluuqaat), the latter being more like creatures, and so on.