There are not that close as far as melodies go.
However the claim is due to one section where McCartney’s lyrics are very similar to the Nat King Cole song.
The claim is pretty weak.
McCartney
“Yesterday, all my troubles seemed so far away
Now it looks as though they’re here to stay
Oh, I believe in yesterday.”
Nat King Cole
“… You were mine yesterday
I believed that love was here to stay
Won’t you tell me where I’ve gone astray
Please answer me, my love”
I remember the words to Yesterday, Nat’s is a blank. Did Paul die and get replaced ? Some things are best left alone as we have enough problems.
Also interesting that both melodies start with a triplet: “An-swer-me” and “Yes-ter-day”. Similar but not enough to be a ripoff IMO.