When buying a used phone, you should check the IMEI against the one printed on the box and the one shown in the phone's settings menu ( *#06# ). If all three match, the phone's identity is consistent. However, if they do not match or the IMEI looks tampered with, you should verify the device's history through Samsung's official channels or IMEI checkers.
If you see this address on your device or packaging, you can use the accompanying (International Mobile Equipment Identity) to verify the phone's authenticity: Is Your Samsung Device Authentic? Samsung Po Box 12987 Dublin Ie Imei