In my mind, it’a primarily subject matter.
Hard Rock is frequently rooted in celebrating sex, drugs and rock and roll as topics. Often (but not exclusively) pentatonic/blues/mixolydian based.
for me is the other way Heavy Metal is frequently rooted in celebrating sex, drugs and rock and roll as topics