In vocal music, contrafactum (or contrafact, pl. contrafacta) is "the substitution of one text for another without substantial change to the music".
Is it OK to rewrite a song?
Starting with chord changes or an existing musical track isn't wrong; there is no right or wrong way to write a song.
What is an adaptation of a song?
A new version of a song that is inspired by an original work.