Thanks for your query.Based on the facts that you have posted it appears that you have undergone vasectomy
3 days back and had severe pain
Now you have pain and swelling of the scrotum
and bruising of the penis.
Most likely this is due to haematoma
in the scrotum which has extended along the facial plane in to penis.
Please consult the surgeon who has carried out the surgery.
You may need to get haematoma evacuated .and take antibiotics and anti inflammatory medication to prevent infection.