Thank you for posting your query at DoctorSpring.com
The swelling on the penis is sebaceous cyst. The only treatment for sebaceous cyst is surgical excision. The increase in the size is possible due to trauma during masturbation. You should not touch the lump and get it removed at time suitable to yourself.
Dr Rajiv Goel
Patient replied :
That night a white head appeared on my shaft and popped the swelling has significantly gone down. Is this normal? I've attached a photo! Thank you much! Will I still be able to have sex?
The sebaceous cyst has burst open and the collected material has come out. It always has the potential to get infected. Slowly and slowly the waste material shall again get accumulated. The only definitive treatment is surgical removal.
You can have intercourse. It shall not affect the cyst.