Yes, you are correct. Ethnicity refers to a person's national, cultural, and social background, including their heritage, customs, traditions, and overall cultural identity.
A person's national, cultural, and social background is the basis of their ethnicity.