this advice is NONSENSE, as 99.9% of purchases are made ONLINE, so you pay BEFORE you check. You can ASK the seller and they MIGHT run those tests for you - or not.
A used smartphone can stay linked to the previous owner's accounts even after a factory reset. Activation Lock, Factory Reset Protection or company device management then make it unusable. Here's how to check an iPhone, Android or Samsung phone before you pay.