A common cause is a blocked minor saliva
gland, which is a benign condition.
A swollen area could certainly be from trauma. A long-standing lump could be a benign or cancerous growth. If it has not been there long, it's probably nothing serious, but get it checked out if it doesn't go away.