Hydrogen generally forms covalent compounds. Give reason?

Hydrogen because of the presence of only one electron in the valence shell can either lose or gain or share it to acquire noble gas, i.e., helium gas, configuration. Therefore, in principle, it can form either ionic or covalent bonds. But the ionisation enthalpy of H is very high and its electron gain enthalpy is only slightly negative.
As a result, it does not have a high tendency to form ionic bonds but rather prefers to form only covalent bonds.