This sounds like something that should be seen by a doctor. But there are glands on the penis, sebaceous glands. These produce oil and sometimes can get clogged. Like a cyst. They can get infected. I'd get checked out especially if this continues and/ or it becomes painful or hot to the touch. https://www.healthymale.org.au/mens-health/penis-lumps