Loose shorts or pants aren't bad, but I recommend (applicable for people with penises and testicles, I have no experience to offer people with vulvas) wearing tighter underpants (briefs or boxer briefs) underneath to keep you equipment from jiggling about and chafing. Also best to avoid pants with thick seams like jeans, especially for long rides. Cotton-based clothes, again, like jeans, are also less than ideal because cotton holds on to moisture with can cause a rash or worsen chafing. Pants with zippers (jeans again, sadly) can also cause significant discomfort if your crotchular parts and the zipper want to occupy the same space while pedalling.