Left-side jade radical (the 王-shape used as the indexing form of 玉 jade). It signals that 玩 originally meant to fondle or handle a piece of jade - the appreciative play of a connoisseur. The general sense of having fun grew out from there. Distinguished from 王 king by position only.
Right side gives the sound: 元 yuán shifts to 玩 wán - initial drop with the rime preserved, a typical phonetic pattern. The first/primary meaning of 元 is irrelevant here; pure sound borrowing. Same phonetic in 完 (complete), 院 (courtyard), 远 (far).