I know the little jar symbols on products (toiletries, etc.) mean "use within x months of opening", but what counts as "opening"?

Is it literally opening the bottle/jar/whatever, or is it opening and actually using a bit?

Some products do not have an internal seal. So if you flip the lid of a "6 month" product to smell it, then close it again and don't actually use it for a few years, has it gone past its useby??

I know it's something to do with bacteria getting in but not sure exactly how this works.

Thanks for any help!
2c/3a thick hair, attempting CG again!