Hi, this is a debated topic! Doctors now know that newly born babies probably feel pain. But how much pain they feel during labour and delivery is still debatable! Shortly after birth, babies have been shown to feel pain. So it may be that a baby does feel pain while going through the birth canal.
Remember, mammals are evolutionarily designed to pass through the birthing canal. At birth, a baby’s head bones are relatively soft. When a baby passes through the birth canal, their head is able to change shape as the bones slide over each other due to soft spots or fontanelles. This is called moulding and this process helps the baby to get through the narrow birth canal.
It seems whether or not babies experience pain is still under debate! Great question!