Pain in nipple when baby latches

Hi

I’m a new mommie here and my baby is 2 days old and while I’m trying to latch my baby or even stumulate milk using breast pump .. both my nipples hurt when milk is coming out.

Midwife checked and said everything looks fine and even the position of baby latching .

What could be the reason and how can i get rid of the pain ?

PS - Ive applied lanisoh nipple cream and my nipples look absolutely fine