You can’t prevent a baby from spitting up. However, to reduce spit-up, avoid overfeeding them or feeding them too fast.
For bottle feeding or breastfeeding (also known as chestfeeding), there are positions and techniques that help a baby eat at their own pace. This typically results in the baby swallowing less air, thus less spitting up.
It also helps to burp babies before, during, and after feedings.
After feedings, keep your baby upright for 30 minutes and avoid excessive movement and stimulation such as bouncing and tummy time.