Its called compare and contrast. It’s also with the musical world called variations on a theme. I hope that helps.
Variations? I’ve written many a song in minor or Major key and such a change is pretty much a different song. The whole damn mood and feel are gone.