is not something I would advise to just take some analgesics and wait for it to go away. There can be a number of serious problems like orchitis
to testicular torsion
which can be responsible. Also compounding the situation are some conditions like ureteric stones which can cause pain radiating to the testis.
So I would suggest to see your doctor as soon as possible and also get an ultrasound
done. This should help to get some idea about your problem. Please revert with the results.
Get well soon.