Copper, being less reactive, when reacts with cone. nitric acid, gives
$ N{{O}_{2}}, $ but not $ {{H}_{2}} $ .
$ Cu+4HN{{O}_{3}}(conc)\xrightarrow{{}}Cu{{(N{{O}_{3}})}_{2}} $
$ +2N{{O}_{2}}+2{{H}_{2}}O $
while $ Mg $ and $ NaH $
being very reactive give hydrogen gas with steam and water respectively.
$ Mg+2{{H}_{2}}O\xrightarrow{{}}MgO+{{H}_{2}} $
$ NaH+{{H}_{2}}O\xrightarrow{{}}NaOH+{{H}_{2}} $
Ethanol and phenol due to the presence of acidic hydrogen also produce hydrogen with metallic sodium.
$ {{C}_{2}}{{H}_{5}}OH+Na\xrightarrow{{}}{{C}_{2}}{{H}_{5}}{{O}^{-}}N{{a}^{+}}+{{H}_{2}} $
$ {{C}_{6}}{{H}_{5}}OH+Na\xrightarrow{{}}{{C}_{6}}{{H}_{5}}{{O}^{-}}N{{a}^{+}}+{{H}_{2}} $