Try this method as a way to have fresh milk on hand when you return from a trip, to stock up should you get stuck at home with sickness, or to make the most of milk that you find on sale.
To freeze a half gallon of milk, simply open it and use 1/2-1 cup of the milk. Secure the lid and lay the container flat in the freezer.
To freeze a gallon of milk, open it and use 1 cup of the milk. Secure the lid and place upright into the freezer.
To freeze single serving containers of milk, place into the freezer.
To freeze a small portion of milk, fill an ice cube tray with milk as you would water if you were making regular ice. Place into the freezer.
Freeze for 3-6 months. Thaw in the fridge or at room temperature. (It can take a few days to thaw in the fridge, but I usually leave it at room temperature overnight. I don't consider it a food safety risk since part of the milk usually stays frozen until morning, but do what you think is best.) Transfer milk ice cubes to a freezer storage bag once frozen, remove as much air as possible, and seal. Try to use milk ice cubes within 2-3 months.
Once thawed, use milk within 5 days.
Notes
When freezing a half gallon or gallon if milk, be sure to remove a little of the milk to allow room for the liquid to expand in the container as it freezes.
Expect the container to bulge out a little as it freezes. It may or may not return to the original shape.
You can do this with plant milks, though know that they may separate a little when thawed. Shake well and/or use in smoothies or other recipes (like baked goods) where they'll be mixed with other ingredients.
Before you go on vacation, plan to freeze a new container of milk or a partial one that's lingering in the fridge. This will avoid waste and will help you be able to have milk on hand without going to the store first thing.
Consider using an ice cube tray with cubes in a shape that will fit into the sippy cup or regular cup where you plan to put them.
Place milk ice cubes into a sippy cup and store in the fridge overnight to thaw. It will thaw fully or partly, depending on the temperature of your fridge.
Thaw half gallons or gallons of milk in the fridge (which will take a few days) or overnight at room temperature. Place it in the sink to avoid condensation on your counter.
Thaw ice cubes in a cup or container overnight in the fridge.
Thaw single serving milks in the fridge overnight. You can also pack them in a lunchbox frozen to work as an ice pack and a drink at lunch on hot days.