To milk cows in Dumpster Gang, carry an empty bucket to the cow in the farm barn and interact to fill it. If your checklist also asks you to use the milk on the farmer's bed, take the filled bucket there afterward. Treat collection and delivery as separate steps so you don't leave a task unfinished.
Bring an empty bucket to the barn
Start with an empty bucket in the Working on the Farm demo mission. Take it with you when you go to the barn. Player commentary from a recorded farm run identifies the bucket as the item needed for collecting the milk.
Fill the bucket at the cow
Approach the cow with your bucket and use the available interaction to collect milk. Check that you've filled the bucket before leaving the barn. The hands-on demo report describes milking the cow in the barn as part of the farm raid.
Carry the milk to the bed
Take the filled bucket to the farmer's bed if the bed objective is active. Use the milk there, then check the mission list for credit. If you've filled the bucket but the task for the bed is still open, that is the next place to go.
FAQ
Where is the cow for the milk task? Look for it in the farm barn.
What do I need to collect milk? Bring an empty bucket to the cow.
Why is the bed objective still active after filling the bucket? That objective calls for you to use the milk on the farmer's bed after collecting it.