Go for 3/4" plus the thickness of the drywall for wood studs. So for standard half inch, the 1 1/4" should be fine. When we double up the drywall on a fireproof ceiling, we switch to the 2"+ screws for the second layer. Those numbers may be less with metal studs, best to check with the metal stud manufacturer.
You can go for longer screws if you have some difficult joists to hit, but they cost more and take more time and effort to install. The risk with longer are that you might hit a cable or pipe running through the center of the stud, but there really should be steel safety plates at those locations. If you're going into some kind of sound attenuation channel, you want to avoid screwing through the channel and into the stud behind it, which would be another use case for shorter screws.
With wood studs, you use the course thread screws. And for metal studs, you want the fine thread screws. Trim head screws are only for installing wood trim itself and not drywall (you want a large flat screw head for drywall to spread the load over the paper face and be easy to cover with drywall mud).