Each oven shelf has a set number of credits, and each item needs a certain number of credits.
For example, a large pack of Spaghetti Bolognaise (8 portions) is 3 credits, and a small pack (3 portions) is 1 credit. This shelf has 9 credits, so it can fit 3 large packs, 9 small packs, or a mix of pack sizes that adds up to 9 credits