Gene is known as the unit of heredity.
Since genes are made of DNA, they are functional units of heredity. The chromosome is made up of DNA that contains many genes. Each gene contains a unique set of instructions for a specific function or protein coding. Genes are responsible for heredity.
Reasons for hereditary
Genes come in pairs in the same way as the chromosomes. Each parent of a human being carries two copies of their genes and each parent passes one copy of genes to their child. This is the reason why the child has many characteristics of both the parents like hair colour, same eyes etc.