Lot number
A lot number identifies which production run a particular container came from.
It is the only thing that connects a specific container in your hand to any document written about it — a certificate of analysis, a recall notice, or a test result someone else published.
Recording it from the container rather than from memory is what makes a record traceable later. Once it is lost, no later reasoning recovers it.
What it is not
A lot number is not a serial number unique to your container, and not a quality marker. It identifies a batch, which may be very large. Two containers with the same lot number came from the same run; that is all it tells you.