The trilateral root ‘ha-fi-za’ in Arabic means to protect, preserve, guard or sustain.
Hifz is the noun form of the root and it means ‘preservation’ or ‘protection’. In Hindi/Urdu we also use hifaazat (protection, safety) which is a derivative of the same root.
Haafiz means ‘protector’ or ‘guardian’. In Islamic theological tradition, the haafiz are tasked with the memorization and hence safe-keeping of the Quran. Al-Haafiz is also one of the names of God in the Sufi tradition. And who hasn’t heard of the famous Persian poet Hafiz?
Mehfuuz is the object of the action of protection or preservation so it means that the thing that is ‘protected’ or ‘preserved’. By extension it also means ‘safe’. Remember the song ‘Mehfuz’ by Euphoria?
Tahaffuz is the verbal noun of one of the derived roots of ‘ha-fi-za’. This is the fifth pattern of derived roots which often makes the original root or its derived transitive form reflexive/intransitive. So tahaffuz shows that the action of protection or preservation is turned towards oneself, hence it has the meaning ‘caution’ or ‘restrain’.