Odoo as of v17 can´t value stock by lots, these are not taken into account by the stock valuation layers.
Many companies need this cost tracking method since prices from one lot to another might vary.
See this documentation below so you can find out about a workaround we recommend to satisfy this need.