32وَلَا تَتَمَنَّوْا۟ مَا فَضَّلَ ٱللَّهُ بِهِۦ بَعْضَكُمْ عَلَىٰ بَعْضٍ ۚ لِّلرِّجَالِ نَصِيبٌ مِّمَّا ٱكْتَسَبُوا۟ ۖ وَلِلنِّسَآءِ نَصِيبٌ مِّمَّا ٱكْتَسَبْنَ ۚ وَسْـَٔلُوا۟ ٱللَّهَ مِن فَضْلِهِۦٓ ۗ إِنَّ ٱللَّهَ كَانَ بِكُلِّ شَىْءٍ عَلِيمًا
[32] And do not covet what Allah has given some of you more than others: the men shall have their due share according to what they have earned and the women shall have their share according to what they have earned. So pray to Allah for His bounty; most surely Allah has perfect knowledge of everything.54
54In this verse Allah has given a very important moral instruction, which, if observed, would bring great peace in the troubled social life of today. Allah has taught people not to be covetous for and be envious of the possessions of others, for He has not; in His wisdom, created all men alike. But for this disparity life would have become dull.
As Allah has perfect knowledge of everything, He has created one beautiful and another ugly. He has given to one a melodious voice and to another a harsh voice. He has made one of strong physique and another of weak constitution. He has endowed one with some good qualities of mind and body and another with other qualities. He has created one in straitened and another in opulent circumstances. He has provided one with ample resources and another with scanty ones. A little thinking will convince a person that the variety in human culture is due only to those very differences and distinctions which are based on wisdom and perfect knowledge. That is why chaos of one sort or the other results whenever people artificially try either to aggravate these differences and distinctions or to eliminate them totally. The human tendency to envy others because of their superiority in anything generates jealousy, cut-throat competition, enmity, class struggle and the like with the resulting consequences. One who suffers from such a mentality tries to grab unlawfully that which Allah has not given him through His bounty. In this verse Allah has advised the Muslims to avoid such a mentality and keep themselves free from envying others. One should, however, pray to Allah for His bounty, for He will bestow upon him whatever He considers proper for him, because He has perfect knowledge of everything.
As regards "The men shall have their due share according to what they have earned, and the women shall have their share according to what they have earned," in my opinion it means that women should not envy men and men should not envy women because of any superiority the one has over the other because of Allah's bounty. They should make full use of whatever Allah has given them and rest assured that each one will get one's due share according to what good or evil one earns and of the same quality that one deserves.