Both are major sins, however, of a different level.
There is no worldly punishment prescribed in the world for masturbation. The punishment for Zina is 100 lashes if the person is not married or stoned to death if he is married. It is clear that the crime of Zina is more severe than masturbation. Rasulullah (Sallallaahu Alayhi Wasallam) says, ?Allah curses the person who commits masturbation.?
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai