It can be due to lactose intolerance where the baby is allergic to milk, take him to a pediatrician as early as possible because there will be loss of fluids.
my son had loose motions from birth turned out he was lactose intolerance and cant have any sort of dairy product