Why the hell did this happen😭

So I went to go pee and for some reason my left ball decided to tighten for no fucking reason😭 and it didnt really hurt but im just confused. This has happened to me a few times before, what is this? Why does this happen? And does anyone else have this happen to you?