Rangers have three very distinct builds available to them in Baldur's Gate 3: Hunter, Beast Master, and Gloomstalker. When it comes down to it, having more party members with more abilities to throw down in combat is often better than higher single-target damage. As such, the Beast Master is easily the best pure Ranger build in BG3.
Baldur's Gate 3: Best Ranger Class Build
The Ranger subclass Beast Master makes for one of the strongest Ranger Builds in Baldur's Gate 3 thanks to its Summon Companion feature.