In essence the 2 year manufacturers warranty follows the phone not the person buying it however Samsung may ask for proof of purchase.
Also I've seen in the past that a person has purchased a phone in good faith only for it to be imei blacklisted as part of an insurance claim a few weeks after using it.
I'd agree with the others with buying either from a reputable shop that buys and sells unwanted phones or direct from Samsung @madaboutplants
Current Phone ~
Samsung Note 20 Ultra 5G SM-N9860_256Gb SnapDragon 865+
Samsung One Ui 3.1/ Android 11.