Unique Random Code per Product (QR or Barcode or number or text)
Companies, who provide the unique code per product, make more sense. There are two type of Codes usually provided:
A. Open (visible to everyone even before purchasing the product)
If the codes are open (not protected by some scratchable layer), then it is of not much use, anyone can copy them and pass the counterfeit check, no matter what
company claim about the crypto tech or AI tech they use in the backend (although with the help of geo-location tech and AI, red flags can be raised for some cases).
Truth is, if you have the same code as the original, which you can see without buying the product, then you can copy it and pass the counterfeit-check.
B. Hidden or protected code
These are the physically protected QR or Barcode or Alphanumeric codes and you must buy the item before you can see the code, for example, scratchable card, and then verify with the backend server.
This does protect the item and if the backend technology is implemented properly, i.e. non-guessable codes are generated, then this will prevent the counterfeit.
But problem is, user has no idea before buying the item if it will be genuine or not, not only this company who has not implemented the backend properly may pass some items which may be fake, or may pass already scratched code again and again.
Secondly, if their DB is hacked then it will be very simple for the hackers to sell the codes to Counterfeiters.
The development and more importantly maintenance and security of such system is not simple and usually costs good maintenance cost. And the authenticating servers will have to be always online.