Our results indicate that women who received anti-HER2 treatment exhibited an elevated risk of developing osteoporosis. Here, ERBB2 is linked to osteoporosis.