In general and for a one sided problem: Leave hydrocele until 3 (maybe 6 if seems to be resolving), can treat UDT at three (I used to leave a bit longer if unilateral, until child could understand about an operation and I could never condone early surgery because “he will not remember”), and assuming on opposite sides, can do both at same time somewhere in between.
In 90’s we were told we had to bring them down or they would not develop. Sorry that was rubbish <bollocks even> if they were not 100% [healthy or developed] they failed to descend, or just shrivelled in the inguinal canal. Having retired, it is my belief that orchidopexy is a cosmetic operation and has no impact on the ability of that testis to produce meaningful sperm, but does help self esteem and it can still make testosterone if it the only one. Removing an undescended testis may decrease risk testicular cancer but I would argue not.
On performing surgery before the age of 1:
Having done some of the research work in neonatal rats I know that picking up the vas, with Gillies or even “vascular” forceps, sterilised the rat on that side. I used to wait, at least until the puppy fat melted, say beginning of toddling, before surgery.