Nitric acid is not used in the preparation of hydrogen.
Nitric acid (HNO3) is a strong oxidising agent.
Oxidizing Agent: This is a type of substance that itself gets reduced and oxidises another substance present in the reaction.
Reason: Nitric acid being a strong oxidizing agent will oxidize the hydrogen formed in the reaction and will result in the formation of water.
For example:
Zn (s) + HCl (aq) ZnCl2 (s) + H2 (g)
As hydrogen forms in the reaction between zinc (Zn) and nitric acid (HNO3) will get oxidised because of the strong oxidising nature of nitric acid.
Zn (s) + 4HNO3 (l) Zn(NO3)2 + 2NO2 (g) + 2H2O (l)