Well, If it’s a bruise (hematoma), there not much you can do for it. Younger people heal faster than older people. No one can tell you how long it will take to clear up.
Before I made the move to steel cock rings I used to play with silicone ones. They would pinch and I would get bruises exactly like you describe. There are a ton of blood vessels in your genitals, so bruising is easy. But at the same time, all that circulation allows for rather quick healing. I’d give it a week and I bet you’re back to normal.
I've had it happen too. I had it more often when I wore brief style underwear. I think they would gather up and pinch a vessel. Since I now go either camo or panties I don't have any issue
I had bruises the first time my wife gave me a bj and got her teeth involved. It took at least a week for it to heal.
I got hit by a foul ball right on the end of my cock years ago. The impact caused pain in my groin for an hour or two after but my cock didn't hurt until several days after. It did have a large bruise that covered the complete head and was painful to the touch for several days, maybe a week. It took six week to two months for the discoloration to clear up. It's too late for the OP but for anyone else who may experience a bruised cock wrap an ice pack around it 20 minutes at a time, 3 or 4 times a day, for several days. That helps the swelling and healing process.