My wife successfully breastfed both our children. She had some initial difficulties with the first one, basically due to inexperience. She went to a breastfeeding consultant and that made a big difference, especially holding our daughter so she could get a good latch and making sure her mouth was in the right place.
Basically it is a learning experience for both mother and baby, and it always takes a new baby a few weeks to truly get the hang of it, even up to six weeks. Babies are not very good at learning at that age.
My observation is that mothers who supplement what their milk with formula end up not breastfeeding. The baby finds it so much easier to suck form a bottle and the milk is sweeter, even though both are bad for the baby and make it fat, so the bay insist on a bottle. Mother's who've had a normal birth very rarely don't have enough milk so long as they don't feed the child formula. Mothers who give birth by Caesarian seem to find it much harder, I think because their body doesn't realise they have given birth at all.
For some reason, giving a baby any other type of food seems to reduce milk production. Either formula or when a baby gets interested in food about five months. Some natural process we don't understand.