Hi
Please see a vet; this looks sore and inflamed; he will need an antibiotic. Ask them to check whether there is a semen rod stuck in the penis shaft or whether he has a hardened shell of smegma build up around his penis.
Semen rod
View attachment 198666
Smegma (the white stuff; normal build up requiring gentle removal)
View attachment 198668
If a hair has got around the penis tip and is strangling it, it will go blue and then go necrotic from lack of oxygen/blood supply.
Please do not wait and see a vet! This can be potentially very serious.