Bleeding for 24 days

I’ve been bleeding for 24 days straight and have been getting a lot of sharp pain in my side. I’m not sure what I should do. I have PCOS but I’ve never bleed this long on birth control. What should I do?