When that happened to me my mom had me in a warm bath with salt and get rubbing my penis and foreskin for 30 minutes. The swelling went down then she put a zinc cream on it. She still checks my foreskin about 3 times a week and pulls it back for me. I have never had a swollen foreskin since.
Had the same problem as a kid. My mom had me soak my penis in some warm water with s bit of salt added. It worked very well and in about tow days. After I could pull my foreskin back and wash properly I never had the problem. Salt has been used for many years. It would hurt your penis and it does not sting or burn.
What did you do to it? Sounds like you might have an infection, I've heard those are easier to get when you're uncircumcised I guess that's another reason to get cut, that and dick cancer, the incidence is much higher, that's what my dad used to always tell me.