Lot control setp is done at item master organization level or item organization level. Navigate to item and inventory attributes tab. First you can check/uncheck to turn-on/off the lot control for each item. You can choose either Full control or no control. Once enabled you are expected to enter lot numbers in every transaction you do.
Setup Lot expiry date, this controls when the lot becomes expired and systematically it prevents lot being used in manufacturing/assembly/shipping. Shelf life control can be defined in number of days.
Enter lot number uniqueness. Lot uniqueness can be within and Item or across an item or within an inventory organization.