My foreskin retracts when I’m not erect, but it doesn’t when I am…and it hurts!
It’s tough to say exactly what’s going on without an exam, but it could be one of two things. First, you still have some phimosis (or a tight foreskin). It’s stretched enough to retract over a smaller, non-erect penis, but when your penis is erect (thicker and more firm) the foreskin hasn’t quite stretched enough. If this is the case, continued gentle stretching (and discussing with your doctor about the possibility of a medication) can open up the foreskin further and allow it to retract over an erect penis. The second thing that might be happening is that you have a tight frenulum (the strand of skin that connects the head of your penis to the underside of your shaft). When it’s super tight and causes a little bend in the penis it’s called frenulum breve. If this sounds like what you’re dealing with, talk with your doctor. It might need a little extra medical attention to fix, but it’s absolutely worth it.