Hi! It is most unlikely a side effect of Betamethasone. I strongly advise you to take a cold shower, lubricate your penis with soap or lotion and try to return your foreskin over the head of your penis. If you fail to return it over the head of your penis I urgently advise you to make an appointment with an urologist as soon as possible since paraphimosis can occur an cause a real medical emergency.
There is actually technical name for this. The foreskin can get stuck in a retracted position like this. https://www.medicalnewstoday.com/articles/318833 It's called paraphimosis. The article has some suggestions and they include using ice to shrink any swelling. I don't know if the cream had ANY involvement other than hygiene can be involved in this happening and wondering if the cream didn't cause some irritation that resulted in swelling. I'd act quickly to resolve and if you can't on your own, go directly to your doctor.