Most of the frothy stools of a four-month-old baby are caused by indigestion. If the baby is still mentally well and responds well to breastfeeding, oral digestive aids and probiotics can be given. If the buttocks are flushed or broken, you can apply topical ointment to protect the skin and pay attention to hygiene while breastfeeding. If the stool contains mucus or blood in addition to foam, fever, poor mental status, rash, etc., you should go to the hospital promptly, have your stool and blood tested if necessary, and give the appropriate symptomatic treatment according to the test results.