I've been breastfeeding and it really just hurts some times even unbarring pain any tips

For me if my little one wasnt latched correctly would hurt like that. I also heard it can happen if u get that mastis. I would try a nipple shield heard they help. Or the ointment if its painful after.