trouble with sex

sooo me and my boyfriend have been dating for 2 years and we’ve tried to have sex but every single time feels like the first time because it hurts soo bad and i cant handle it and i stop what should i do? although he completely understands im tired of always getting hurt i feel incompetent :/