They are related because they are caused by the same virus (varicella-zoster virus). Even after a person recovers from chickenpox, the virus remains dormant (inactive) in the body. Years later, it can reactivate and cause shingles.
Keep in mind, more than 99% of Americans born on or before 1980 have had chickenpox. So even if you don’t remember having the disease, you should talk with your health care provider about getting the Shingrix vaccine.
Source: https://www.cdc.gov/vaccines/vpd/shingles/public/shingrix/index.html