According to the documentation, creating a lot number reserves it for a product but does not assign it.
There are multiple ways to assign lot numbers to groups of products based on sharing common properties and other properties. They can be imported from an existing or created from scratch. Check here for more details on all possible options and select the one that fits your needs.