Re only copyright melody – that’s not true in the UK.
This implies, which I know that many people think, that if you change the melody a bit but keep the same chords, arrangement, structure and rhythm then it’s OK
As a creator of an original piece you are not allowed to plaguralise the creative endevours of another – that’s the law in the UK – the creative endevour can be the chords, arrangement, a key hooky riff etc
It’s not about only copying 3 notes or whatever rules of thumb people have decided.
I’ve worked closely with Musicologists to understand all this and I know many people sail very close to the wind often because they don’t know wha the copyright law actually says on this
Regards
David