You might have a spermatocele -
https://www.urologyhealth.org/urology-a-z/s/spermatoceles
https://www.mayoclinic.org/diseases-conditions/spermatocele/symptoms-causes/syc-20377829
These are generally harmless, and don't need treatment, but you should get it checked out, especially if you are between the ages of 15-35, which are the most common ages for testicular cancer. It's not likely, but you need to make sure it's not that.