You are assuming the location of the milk (cow or oat) in the fridge remains consistent for your weighing device, otherwise you may wish to build a base your milk container can be fitted to when it first enters the premises and the two become a smart container as a single unit. 3D printers may be of assistance - you must surely have one if you are looking at this kind of project.
What if there are two milk containers? Will emptying one being weighed result in a re-order, and your second one goes off as it wasn't being used?
What if somebody buys a carton of the 2 litre one, and you have carefully calibrated for the 1 litre one? The shelf width for your sensor pad seems a little wide - what if the carton is not placed centrally or an adjacent one leans on it?
Your battery life will be considerably shorter in the cold. Would two wires snaking out of your fridge be an unpopular impost for the power supply or even all the smarts excluding the load sensor?
Buying a cheap human weight scale that has BLE integrated and disassembling it for parts to fit your fridge may be an option. The sensors are pretty universal, and you may find the one that can read 200kg (four 50Kg load cells) may actually be sensitive enough to measure a litre of milk down to the thimblefull. If not, check the associated chip data sheet (often a HX711) and substitute the appropriate load sensor. Countless such projects are out there. Even for ESPHome and HomeAssistant already done for you.
Are there others in the household that will carefully reorganise your fridge each day, and will need to be politely asked not to move your container? Annoying little sisters or toddlers??
Solve those problems first before tackling the weight sensing and re-ordering issues.
Consider doing that for all the other items in your fridge and also your pantry, and the cost of hiring a (human) maid, carer if you are disabled, or just hassling your mother to do all this for you may become far more attractive.
AI optical recognition, where a snapshot is taken of your containers when the door is opened, and again when closed, and calculations made of consumption and trends may offer a different approach. Of course all items will have to be sufficiently visible as to how much content is left.
You could develop a database and have everybody fill out what they used from the fridge each time they opened it. This may prove onerous and you may find yourself ostracised (or murdered).
You may ask your oaf milk vendor if they have self re-ordering containers, or smart fridges and cupboards. You might invent a new form of shopping and make Jeff Bezos a pauper.