Do kegels actually work?

I’m 23 and I think that my pe problem comes from bad masturbation habits and no sex in many years. It’s more in depth on my profile but that’s the basics of it.

How beneficial are kegels? I feel like i see the idea, but if im about to have an orgasm I’m skeptical on how that works.

Do you just stop sex or whatever activity you’re doing to do a kegel flex and stop cumming or do you hold it the whole time you have sex?

How long do you do kegels before you see any progress?

Thanks for any answers to my questions!