Record individual serial numbers for inventories?

I really couldn’t make a separate inventory item entry each time. That would be a bit to laborious. I would like something where product0 would be a class and each individual inventory quantity (product0 #1, product0 #2 …) would be an instance of that class. (Please excuse the elementary comp sci understanding … I’m not a dev of any caliber).