Honestly I think that the ranger is a vestigial class that keeps being included in the game but struggles more and more to find its reason to exist.
Back when the game was more about combat, the ranger was a class which focused more on exploration, tracking, movement, specific monster knowledge and pets.
In o5e they made the very questionable decision of giving some classes (the ranger in particular) more oomph on the underdeveloped exploration pillar instead on the fighting side, resulting in a class that can shine quite a lot but normally not for much time.
In a5e, with a properly developed exploration pillar, the ranger shines even more on that side. The end result is a class that may feel unsatisfactory if the exploration aspect of the game is not that emphasized (which happens quite a lot, since we've been used to it from previous editions' published adventures).
It does have some cool combat features and flavor, but I think its limit is really on its inherited identity which is very tightly coupled with the exploration aspect of the game. If that's not a thing, the ranger has very little reason to exist. A5e has done a lot to improve also the non exploration aspects of the class, but some features, like trap making, are really underwhelming for the level you get them IMO.