Check your flange size - wrong flange size can hurt when expressing and also not emptying breasts properly
Try lubricanting the pump and check flange sizes like previous comments have said. Also if it’s quite early into your pumping journey it could just be that your nipples aren’t used to being pulled constantly. The same way breastfeeding is painful in the begging weeks as your nipples adjust to being used xx
You can lube your pump a bit using coconut oil, olive oil or a baby safe nipple cream like lansinoh - all safe in case tiny amounts get in the milk while pumping. Just wipe a little bit either around your nip or inside the flange before you pump. But def also remeasure your flange size (it can change!) cause a good fit is crucial. You can also get silicon inserts that make a larger flange size smaller and I found those inserts made for a more comfy pump for me, even compared to a flange of the same size. Good luck! ♥️
It could be the pump, you can get pump spray that kind of lubes your nipple to stop the friction pain. Best of luck!